fix: add missing pack, description, image fields to scouting test fixtures

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2026-03-06 18:47:52 -06:00 committed by cal
parent 875d5a8527
commit 0432f9d3f4

View File

@ -12,19 +12,29 @@ from discord.ext import commands
# ---------------------------------------------------------------------------
def _make_player(player_id, name, rarity_name, rarity_value, headshot=None):
def _make_player(
player_id,
name,
rarity_name,
rarity_value,
headshot=None,
description="2023",
image=None,
):
"""Build a minimal player dict matching the API shape used by scouting."""
return {
"player_id": player_id,
"p_name": name,
"rarity": {"name": rarity_name, "value": rarity_value, "color": "ffffff"},
"headshot": headshot or "https://example.com/headshot.jpg",
"description": description,
"image": image or f"https://example.com/cards/{player_id}/battingcard.png",
}
def _make_card(card_id, player):
def _make_card(card_id, player, pack_id=100):
"""Wrap a player dict inside a card dict (as returned by the cards API)."""
return {"id": card_id, "player": player}
return {"id": card_id, "player": player, "pack": {"id": pack_id}}
@pytest.fixture