undef-engine 2026-03-28
Fix Redis test isolation under pytest-xdist; add auth lockout tests
4 files · 232+ · 159-

Redis test isolation under pytest-xdist

2 files changed
  • test_card_repository_cross_backend.py Added test_game_id fixture using PYTEST_XDIST_WORKER for worker-unique game IDs; redis_repo now uses REDIS_DB env var to avoid cross-worker DB collisions
  • test_redis_card_repository.py Same worker-unique game ID and REDIS_DB isolation pattern
  • Under pytest-xdist -n auto, parallel workers share the Redis instance. Tests using hard-coded ’test-cross’ game IDs would collide and interfere. test_game_id fixture now generates IDs from PYTEST_XDIST_WORKER, and redis_repo reads REDIS_DB from env (set per worker by integration conftest) to partition by DB index. remediate internal
    2 files
    • test_card_repository_cross_backend.py
    • test_redis_card_repository.py

Auth lockout tests and list endpoint updates

2 files changed
  • test_lockout.py 16-line auth lockout unit tests
  • test_list_endpoints.py 12-line update for list endpoint integration tests
  • Added unit tests for auth lockout behavior. Updated list endpoint integration tests for current API response shape. qualify internal
    2 files
    • test_lockout.py
    • test_list_endpoints.py