Sync shared snapshot from 74942e5
Security / Secrets (gitleaks) (push) Successful in 1m19s
Security / Dependencies (Trivy) (push) Successful in 1m16s
Security / Code (Semgrep) (push) Successful in 2m32s
Docker / Docker Build & Push (push) Successful in 9m4s

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
GabrielandClaude Haiku 5.5 committed 2026-11-10 14:52:27 +01:00
1 parent 0fd1805502
commit 833eab04af
4 files changed
+25 -14

No files matched your search

@@ -51,7 +51,7 @@ def _user_row(username: str, email: str = "") -> dict:
class AuthStoreHardeningTests(unittest.IsolatedAsyncioTestCase):
def setUp(self) -> None:
self.db = _FakeDatabase()
self.store = AuthStore(self.db, single_user=False) # type: ignore[arg-type]
self.store = AuthStore(self.db, single_user=False) # ty: ignore[invalid-argument-type]
async def test_ensure_schema_requests_the_case_insensitive_username_index(self) -> None:
await self.store.ensure_schema()
@@ -116,7 +116,7 @@ class AuthStoreHardeningTests(unittest.IsolatedAsyncioTestCase):
return await super().execute(query, *args)
database = ReplayDatabase()
store = AuthStore(database) # type: ignore[arg-type]
store = AuthStore(database) # ty: ignore[invalid-argument-type]
self.assertTrue(await store.enable_totp(1, "287082", 59.0))
self.assertEqual(database.state["last_used_step"], 1)
self.assertFalse(await store.consume_totp_code(1, "287082", 59.0))
@@ -148,11 +148,13 @@ class AuthStoreHardeningTests(unittest.IsolatedAsyncioTestCase):
"lower(email) = lower($1)": _user_row("owner", "owner@example.com"),
}
found = await self.store.find_by_identifier("owner@example.com")
assert found is not None
self.assertEqual(found.username, "owner@example.com")
self.assertEqual(len(self.db.fetched), 1)
del self.db.rows_by_condition["username = $1"]
found = await self.store.find_by_identifier("owner@example.com")
assert found is not None
self.assertEqual(found.username, "owner")