Exemple #1
0
class DeckTests(TestHelper):
    def test_validate_agenda_points(self):
        self.container = Deck(json='missing_agenda.json')
        self.assertFalse(self.container.validate_agenda_points())

        self.container = Deck(json='correct_agenda.json')
        self.assertTrue(self.container.validate_agenda_points())

    def test_validate_composition(self):
        self.container = Deck(json='mixed.json')
        self.assertFalse(self.container.validate_composition())

        self.container = Deck(json='only_weyland.json')
        self.assertTrue(self.container.validate_composition())

    def test_validate_only_one_identity(self):
        self.container = Deck(json='two_identities.json')
        self.assertFalse(self.container.validate_has_only_one_identity())

        self.container = Deck(json='one_identity.json')
        self.assertTrue(self.container.validate_has_only_one_identity())

    def test_validate_influence(self):
        self.container = Deck(json='over_influence.json')
        self.assertFalse(self.container.validate_influence())

        self.container = Deck(json='at_influence.json')
        self.assertTrue(self.container.validate_influence())

        self.container = Deck(json='under_influence.json')
        self.assertTrue(self.container.validate_influence())

    def test_validate_gte_minimum_deck_size(self):
        self.container = Deck(json='under_minimum_deck_size.json')
        self.assertFalse(self.container.validate_deck_size())

        self.container = Deck(json='at_minimum_deck_size.json')
        self.assertTrue(self.container.validate_deck_size())

        self.container = Deck(json='above_minimum_deck_size.json')
        self.assertTrue(self.container.validate_deck_size())