test: 下载接口测试改用本机地址

This commit is contained in:
2026-10-25 07:22:47 +08:00
parent 75dbd27865
commit 7d0f2be9da
+1 -1
View File
@@ -380,7 +380,7 @@ def test_download_api_paths_settings_and_delete(tmp_path: Path, monkeypatch):
monkeypatch.setattr(state, "client", _SilentClient())
monkeypatch.setattr(state, "user", {"loginId": "a"})
monkeypatch.setattr(state, "expired", False)
with TestClient(app) as client:
with TestClient(app, base_url="http://127.0.0.1") as client:
meta = client.get("/api/download/meta")
assert meta.status_code == 200
assert meta.json()["defaultOutputDir"] == str(downloads)