paper-dynasty-discord/tests
Cal Corum b34dcc390c
All checks were successful
Ruff Lint / lint (pull_request) Successful in 22s
test: add comprehensive refractor test cases (T1-5 through T3-5)
Implements all gap tests identified by PO agents across three existing
test files. No new files created — tests added to existing modules.

T1-5 (test_refractor_notifs): Expose WP-14 integration bug — minimal
stub dict {player_id, old_tier, new_tier} causes KeyError in
build_tier_up_embed because player_name/track_name use bare dict access.
Documents the bug contract so WP-14 implementers know what to fix.

T1-6 (test_refractor_commands): Divergence tripwire — imports TIER_NAMES
from both cogs.refractor and helpers.refractor_notifs and asserts deep
equality. Will fail the moment the two copies fall out of sync.

T1-7 (test_card_embed_refractor): TIER_BADGES format contract — asserts
that wrapping helpers.main badge values in brackets produces cogs.refractor
badge values (e.g. "BC" -> "[BC]") for all tiers.

T2-7 (test_refractor_notifs): notify_tier_completion with None channel
must not raise — the try/except absorbs AttributeError from None.send().

T2-8 (test_refractor_commands): All-T4 apply_close_filter returns empty
list. Documents intended behaviour for tier=4 + progress="close" combo.

T3-2 (test_refractor_commands): Malformed API response handling —
format_refractor_entry must use fallbacks ("Unknown", 0) for missing keys.

T3-3 (test_refractor_commands): Progress bar boundary precision — 1/100,
99/100, 0/100, and negative current values.

T3-4 (test_refractor_commands): RP formula label — card_type="rp" shows
"IP+K" (previously only "sp" was tested).

T3-5 (test_refractor_commands): Unknown card_type falls back to raw string
as the formula label without crashing.

112 tests pass (23 new, 89 pre-existing).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 08:59:18 -05:00
..
command_logic fix: preserve batter at plate when half-inning ends on caught stealing 2026-02-10 22:37:42 -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 fix: invoke actual cog callback in test_error_handling_and_logging (#39) 2026-03-09 13:22:58 +00:00
scouting fix: add missing week field to scout reward POST 2026-03-09 10:20:23 -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_card_embed_refractor.py test: add comprehensive refractor test cases (T1-5 through T3-5) 2026-03-24 08:59:18 -05:00
test_complete_game_hook.py fix: rename evolution/ to refractor/ endpoint and remove misplaced notifs module 2026-03-23 15:22:25 -05:00
test_play_locking.py fix: add locked_play context manager to prevent stuck play locks 2026-02-10 21:54:44 -06:00
test_refractor_commands.py test: add comprehensive refractor test cases (T1-5 through T3-5) 2026-03-24 08:59:18 -05:00
test_refractor_notifs.py test: add comprehensive refractor test cases (T1-5 through T3-5) 2026-03-24 08:59:18 -05:00