fix: update test mock endpoint strings to refractor/cards/ (#114)
All checks were successful
Ruff Lint / lint (pull_request) Successful in 15s

Mock routing in _patch_db_get and _failing_db_get still checked for
"evolution/cards/" after the production endpoint was renamed, causing
all badge-presence assertions to pass vacuously (evo_state=None).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2026-03-23 16:01:18 -05:00
parent 17bd1c085c
commit a4a3fbdac2

View File

@ -71,7 +71,7 @@ def _patch_db_get(evo_response=None, paperdex_response=None):
paperdex_response = _make_paperdex()
async def _side_effect(endpoint, *args, **kwargs):
if str(endpoint).startswith("evolution/cards/"):
if str(endpoint).startswith("refractor/cards/"):
return evo_response
if endpoint == "paperdex":
return paperdex_response
@ -204,7 +204,7 @@ class TestNoBadgeGracefulFallback:
card = _make_card()
async def _failing_db_get(endpoint, *args, **kwargs):
if str(endpoint).startswith("evolution/cards/"):
if str(endpoint).startswith("refractor/cards/"):
raise ConnectionError("API unreachable")
if endpoint == "paperdex":
return _make_paperdex()