paper-dynasty-discord/tests
Cal Corum 00ed42befd Add tests for play lock release and cross-command racing
Adds two new test cases to test_play_locking.py to improve coverage:

1. test_lock_released_after_successful_completion
   - Verifies play.locked is set to False after complete_play()
   - Confirms play.complete is set to True
   - Validates database commit is called

2. test_different_commands_racing_on_locked_play
   - Tests that ANY command type is blocked on locked plays
   - Prevents race conditions between different command types
   - Tests multiple commands: walk, strikeout, single, xcheck

These tests ensure the play locking idempotency guard works correctly
for both lock acquisition and release, and prevents all command types
from racing (not just duplicate commands).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-03 17:13:57 -06:00
..
command_logic Catchup files 2025-11-11 13:22:06 -06:00
gameplay_models Catchup commit 2025-07-22 09:22:19 -05:00
in_game Cogs to Packages Groundwork 2025-08-17 08:46:55 -05:00
other Added AbRoll and JumpRoll 2024-11-17 14:57:54 -06:00
players_refactor Added search functionality to /player command 2025-10-08 14:45:41 -05:00
conftest.py Catchup commit 2025-07-22 09:22:19 -05:00
factory.py Catchup files 2025-11-11 13:22:06 -06:00
test_api_calls.py Add API timeout/retry logic and fix get_team_by_owner for PostgreSQL 2026-01-31 15:52:14 -06:00
test_play_locking.py Add tests for play lock release and cross-command racing 2026-02-03 17:13:57 -06:00