mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-11-01 18:32:05 +00:00
refactor: move api state to app
This commit is contained in:
1 parent
fa4826fe2d
commit
20ee8a891b
6 files changed
+302
-248
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user