def test_deck_count(self): card_1 = Card("What is the capital of Alaska?", "Juneau", "Geography") card_2 = Card( "The Viking spacecraft sent back to Earth photographs and reports about the surface of which planet?", "Mars", "STEM") card_3 = Card( "Describe in words the exact direction that is 697.5° clockwise from due north?", "North north west", "STEM") cards = [card_1, card_2, card_3] deck = Deck(cards) self.assertEqual(deck.count(), 3)
def test_deck(self): card_1 = Card("What is the capital of Alaska?", "Juneau", 'Geography') card_2 = Card("What is the square root of 169?", "13", 'STEM') card_3 = Card("What is the power house of the freaking cell?", "Mitochondria", 'STEM') cards = [card_1, card_2, card_3] deck = Deck(cards) assert deck.cards == [card_1, card_2, card_3] assert deck.count() == 3 assert deck.cards_in_category('Geography') == [card_1] assert deck.cards_in_category('STEM') == [card_2, card_3] assert deck.cards_in_category('pop culture') == []