Esempio n. 1
0
def test_from_tag_set_none_if_tag_do_not_exists():
    card = Card.from_entity(empty_card)
    assert card.health is None
Esempio n. 2
0
def test_card_has_correct_dict_from_attribs(name, expected):
    card = Card.from_entity(example_card)
    assert card.dict[name] == expected
Esempio n. 3
0
def test_cards_can_load_multiple_cards():
    assert TestingCards.all_cards() == {
        42: Card.from_entity(example_card),
        0: Card.from_entity(empty_card)
    }
Esempio n. 4
0
def test_card_has_correct_attrib(name, expected):
    card = Card.from_entity(example_card)
    assert getattr(card, name) == expected