paper-dynasty-database/tests
Cal Corum 906d6e575a test: add Tier 3 refractor test cases (T3-1, T3-6, T3-7, T3-8)
Adds four Tier 3 (medium-priority) test cases to the existing refractor test
suite.  All tests use SQLite in-memory databases and run without a PostgreSQL
connection.

T3-1 (test_refractor_track_api.py): Two tests verifying that
  GET /api/v2/refractor/tracks?card_type= returns 200 with count=0 for both
  an unrecognised card_type value ('foo') and an empty string, rather than
  a 4xx/5xx.  A full SQLite-backed TestClient is added to the track API test
  module for these cases.

T3-6 (test_refractor_state_api.py): Verifies that
  GET /api/v2/refractor/cards/{card_id} returns last_evaluated_at: null (not
  a crash or missing key) when the RefractorCardState was initialised but
  never evaluated.  Adds the SQLite test infrastructure (models, fixtures,
  helper factories, TestClient) to the state API test module.

T3-7 (test_refractor_evaluator.py): Two tests covering fully_evolved/tier
  mismatch correction.  When the database has fully_evolved=True but
  current_tier=3 (corruption), evaluate_card must re-derive fully_evolved
  from the freshly-computed tier (False for tier 3, True for tier 4).

T3-8 (test_refractor_evaluator.py): Two tests confirming per-team stat
  isolation.  A player with BattingSeasonStats on two different teams must
  have each team's RefractorCardState reflect only that team's stats — not
  a combined total.  Covers both same-season and multi-season scenarios.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 21:38:25 -05:00
..
__init__.py feat: evolution track seed data and tests (WP-03) (#68) 2026-03-12 17:35:12 -05:00
conftest.py refactor: rename evolution system to refractor 2026-03-23 13:31:55 -05:00
test_formula_engine.py test: add Tier 1 and Tier 2 refractor system test cases 2026-03-24 09:02:30 -05:00
test_postgame_refractor.py test: add Tier 1 and Tier 2 refractor system test cases 2026-03-24 09:02:30 -05:00
test_refractor_evaluator.py test: add Tier 3 refractor test cases (T3-1, T3-6, T3-7, T3-8) 2026-03-24 21:38:25 -05:00
test_refractor_init.py test: add Tier 1 and Tier 2 refractor system test cases 2026-03-24 09:02:30 -05:00
test_refractor_models.py refactor: rename evolution system to refractor 2026-03-23 13:31:55 -05:00
test_refractor_seed.py test: add Tier 1 and Tier 2 refractor system test cases 2026-03-24 09:02:30 -05:00
test_refractor_state_api.py test: add Tier 3 refractor test cases (T3-1, T3-6, T3-7, T3-8) 2026-03-24 21:38:25 -05:00
test_refractor_track_api.py test: add Tier 3 refractor test cases (T3-1, T3-6, T3-7, T3-8) 2026-03-24 21:38:25 -05:00
test_season_stats_model.py refactor: deduplicate pitcher formula and test constants 2026-03-17 09:49:33 -05:00
test_season_stats_update.py fix: stale docstring + add decision-only pitcher test 2026-03-19 10:31:16 -05:00