test: 下载接口测试改用本机地址
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user