mantimon-tcg/backend/tests/unit/services
Cal Corum 0a9cd73daf Validate connection data integrity in ConnectionManager
Fix audit warnings about empty string defaults hiding data corruption:

1. get_connection_info(): Validate required fields (user_id, connected_at,
   last_seen) exist before creating ConnectionInfo. Return None and log
   warning for corrupted records instead of returning invalid data.

2. unregister_connection(): Log warning if user_id is missing during
   cleanup. Existing code safely handles this (skips cleanup), but now
   we have visibility into data corruption.

Test added for corrupted data case.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 19:03:17 -06:00
..
__init__.py Phase 3: Collections + Decks - Services and DI architecture 2026-01-28 11:27:14 -06:00
test_connection_manager.py Validate connection data integrity in ConnectionManager 2026-01-29 19:03:17 -06:00
test_deck_validator.py Fix medium priority issues from code review 2026-01-28 14:32:08 -06:00
test_game_service.py Replace silent error hiding with explicit failures 2026-01-29 18:48:06 -06:00