mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-11-06 12:52:04 +00:00
Add vault stats command and API endpoint
This commit is contained in:
1 parent
55daa22836
commit
ce8281c80f
6 files changed
+57
No files matched your search
@@ -0,0 +1,13 @@
|
||||
from test_api import client
|
||||
|
||||
|
||||
def test_profile_stats_endpoint(client):
|
||||
cl, token = client
|
||||
stats = {"total_entries": 1}
|
||||
# monkeypatch set _pm.get_profile_stats after client fixture started
|
||||
import seedpass.api as api
|
||||
|
||||
api._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