refactor: move api state to app

This commit is contained in:
thePR0M3TH3AN committed 2025-08-05 19:14:11 -04:00
1 parent fa4826fe2d
commit 20ee8a891b
6 files changed
+302 -248

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ def test_profile_stats_endpoint(client):
# monkeypatch set _pm.get_profile_stats after client fixture started
import seedpass.api as api
api._pm.get_profile_stats = lambda: stats
api.app.state.pm.get_profile_stats = lambda: stats
res = cl.get("/api/v1/stats", headers={"Authorization": f"Bearer {token}"})
assert res.status_code == 200
assert res.json() == stats