1
0
Fork 0

small fix

This commit is contained in:
Arthur K. 2026-04-25 13:18:04 +03:00
parent 5349befcf4
commit 89b85b321e
Signed by: wzray
GPG key ID: B97F30FDC4636357
8 changed files with 251 additions and 211 deletions

View file

@ -42,6 +42,8 @@ def test_store_writes_minimal_accounts_schema(tmp_path) -> None:
"usage": {
"primary": {"used_percent": 70, "reset_at": 1300},
"secondary": {"used_percent": 20, "reset_at": 4600},
"limit_reached": False,
"allowed": True,
},
"usage_checked_at": 1000,
"disabled": False,
@ -65,6 +67,8 @@ def test_store_load_reconstructs_account_state(tmp_path) -> None:
"usage": {
"primary": {"used_percent": 80, "reset_at": 1300},
"secondary": {"used_percent": 15, "reset_at": 4600},
"limit_reached": True,
"allowed": False,
},
"usage_checked_at": 1000,
"disabled": True,
@ -82,6 +86,8 @@ def test_store_load_reconstructs_account_state(tmp_path) -> None:
assert state.accounts[0].usage is not None
assert state.accounts[0].usage.primary_window is not None
assert state.accounts[0].usage.primary_window.used_percent == 80
assert state.accounts[0].usage.limit_reached is True
assert state.accounts[0].usage.allowed is False
assert state.accounts[0].disabled is True