From 3bdacb8f4689a50162e38272dacd261f3dffc17b Mon Sep 17 00:00:00 2001 From: Will Miao Date: Thu, 30 Jul 2026 18:35:43 +0800 Subject: [PATCH] fix(test): update release channel git test to mock _perform_git_update instead of _download_and_replace_zip --- tests/routes/test_update_routes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/routes/test_update_routes.py b/tests/routes/test_update_routes.py index 4fea4a65..6254d049 100644 --- a/tests/routes/test_update_routes.py +++ b/tests/routes/test_update_routes.py @@ -344,7 +344,7 @@ async def test_switch_channel_to_nightly_with_git_calls_git_update(monkeypatch, @pytest.mark.asyncio -async def test_switch_channel_to_release_with_git_downloads_zip(monkeypatch, tmp_path): +async def test_switch_channel_to_release_with_git_calls_git_update(monkeypatch, tmp_path): routes_file = tmp_path / "py" / "routes" / "update_routes.py" routes_file.parent.mkdir(parents=True) routes_file.write_text("") @@ -353,11 +353,11 @@ async def test_switch_channel_to_release_with_git_downloads_zip(monkeypatch, tmp (tmp_path / ".git").mkdir() - async def _fake_zip(*args, **kwargs): + async def _fake_git_update(*args, **kwargs): return True, "v9.9.9" monkeypatch.setattr( - update_routes.UpdateRoutes, "_download_and_replace_zip", _fake_zip + update_routes.UpdateRoutes, "_perform_git_update", _fake_git_update ) req = _fake_request({"channel": "release"})