← Về thư mục
tests/test_team_repository.py
- store · function · L18-L23 — def store(tmp_path, monkeypatch): # 600k PBKDF2 rounds per hash is right for production and wrong for a # test loop; the row records its own iteration count, so shrinking the # constant here exercises the identical code path.
- test_production_iteration_cost_is_pinned · function · L26-L30 — def test_production_iteration_cost_is_pinned(): # M1-2 contract: pbkdf2_hmac('sha256', ..., 600_000). The row records the # count, so bumping this constant must stay a deliberate act. This test # takes no store fixture, so the constant is unpatched here.
- test_repository_shares_store_connection_and_lock · function · L33-L35 — def test_repository_shares_store_connection_and_lock(store)
- test_create_verify_and_reject · function · L38-L48 — def test_create_verify_and_reject(store)
- test_duplicate_username_and_bad_role_refused · function · L51-L60 — def test_duplicate_username_and_bad_role_refused(store)
- test_compatibility_equivalent_usernames_are_refused · function · L63-L71 — def test_compatibility_equivalent_usernames_are_refused(store)
- test_an_upgraded_database_with_portable_username_collisions_fails_closed · function · L74-L103 — def test_an_upgraded_database_with_portable_username_collisions_fails_closed( store, )
- test_password_hash_never_stored_plaintext · function · L106-L113 — def test_password_hash_never_stored_plaintext(store)
- test_verify_uses_row_iterations_not_the_constant · function · L116-L121 — def test_verify_uses_row_iterations_not_the_constant(store, monkeypatch): # A future cost bump must not invalidate existing hashes: verification # reads the per-row iteration count.
- test_disabled_user_cannot_login_and_sessions_die · function · L124-L136 — def test_disabled_user_cannot_login_and_sessions_die(store)
- test_auth_session_round_trip_and_revoke · function · L139-L148 — def test_auth_session_round_trip_and_revoke(store)
- test_auth_session_expiry · function · L151-L157 — def test_auth_session_expiry(store)
- test_raw_token_never_stored · function · L160-L165 — def test_raw_token_never_stored(store)
- test_password_reset_revokes_sessions · function · L168-L174 — def test_password_reset_revokes_sessions(store)
- test_purge_expired_sessions · function · L177-L182 — def test_purge_expired_sessions(store)
- test_audit_log_records_and_filters · function · L185-L197 — def test_audit_log_records_and_filters(store)
- test_user_listing_and_count · function · L200-L207 — def test_user_listing_and_count(store)
- test_host_query_cannot_read_identity_tables · function · L210-L214 — def test_host_query_cannot_read_identity_tables(store): # INV-9 hygiene: the agent-facing SQL surface refuses these tables.