Ejemplo n.º 1
0
    def test_can_buy(self):
        """Test out the _can_buy helper method."""
        deck = Deck()
        deck.treasure = 3
        deck.buys = 1

        # Test too little treasure for the card
        assert_equal(deck._can_buy(cards.Gold), False)
        # Test just enough
        assert_equal(deck._can_buy(cards.Silver), True)
        # Test too much
        assert_equal(deck._can_buy(cards.Copper), True)