Esempio n. 1
0
def test_game_mode_validate_ignores_repeated_lands():
    game_mode = GameMode()
    cards_a = [Land("Some land", "green")] * 20
    deck_a = Deck("deck a", cards_a)

    is_valid, message = game_mode.validate_deck(deck_a)
    assert is_valid
    assert not message
Esempio n. 2
0
def test_game_mode_validates_decks_for_repeated_cards():
    game_mode = GameMode()
    cards_a = [Card("Some card", Cost.empty())] * 5
    deck_a = Deck("deck a", cards_a)

    is_valid, message = game_mode.validate_deck(deck_a)
    assert not is_valid
    assert message == "There can be only 4 cards of type Card and name Some card in the deck and more than that was found."