new migrations in apps.epic for .models additions, incl. Significator select order (= Start Role seat order), which cards of whom go into which deck, which are brought into Sig select; new select-sig urlpattern in .views; room.html supports this stage of game now
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Disco DeDisco
2026-03-25 01:50:06 -04:00
parent c0016418cc
commit b3bc422f46
7 changed files with 159 additions and 70 deletions

View File

@@ -775,35 +775,15 @@ class ReleaseSlotViewTest(TestCase):
SIG_SEAT_ORDER = ["PC", "NC", "EC", "SC", "AC", "BC"]
def _make_sig_cards(deck):
for suit in ["WANDS", "CUPS", "SWORDS", "PENTACLES"]:
for number, court in [(11, "Maid"), (12, "Jack"), (13, "Queen"), (14, "King")]:
TarotCard.objects.create(
deck_variant=deck, arcana="MINOR", suit=suit, number=number,
name=f"{court} of {suit.capitalize()}",
slug=f"{court.lower()}-of-{suit.lower()}-em",
keywords_upright=[], keywords_reversed=[],
)
TarotCard.objects.create(
deck_variant=deck, arcana="MAJOR", number=0,
name="The Schiz", slug="the-schiz",
keywords_upright=[], keywords_reversed=[],
)
TarotCard.objects.create(
deck_variant=deck, arcana="MAJOR", number=1,
name="Pope 1: Chancellor", slug="pope-1-chancellor",
keywords_upright=[], keywords_reversed=[],
)
def _full_sig_setUp(test_case, role_order=None):
"""Populate test_case with a SIG_SELECT room; return (room, gamers, earthman, card_in_deck)."""
"""Populate test_case with a SIG_SELECT room; return (room, gamers, earthman, card_in_deck).
Uses get_or_create for DeckVariant — migration data persists in TestCase."""
if role_order is None:
role_order = SIG_SEAT_ORDER[:]
earthman = DeckVariant.objects.create(
slug="earthman", name="Earthman Deck", card_count=108, is_default=True
earthman, _ = DeckVariant.objects.get_or_create(
slug="earthman",
defaults={"name": "Earthman Deck", "card_count": 108, "is_default": True},
)
_make_sig_cards(earthman)
founder = User.objects.create(email="founder@test.io")
gamers = [founder]
for i in range(2, 7):
@@ -896,10 +876,10 @@ class SelectSigCardViewTest(TestCase):
self.assertEqual(response.status_code, 403)
def test_select_sig_card_not_in_deck_returns_400(self):
# Create a card that is not in the sig deck (e.g. a pip card)
# Create a pip card (number=5) — not in the sig deck (only court 1114 + major 01)
other = TarotCard.objects.create(
deck_variant=self.earthman, arcana="MINOR", suit="WANDS", number=5,
name="Five of Wands", slug="five-of-wands-em",
name="Five of Wands Test", slug="five-of-wands-test",
keywords_upright=[], keywords_reversed=[],
)
response = self._post(card_id=other.id)