Пример #1
0
    def test_dealer_busts(self):
        test_chips = game.Chips()
        test_chips.bet = 10
        game.player_wins("", "", test_chips)

        self.assertEqual(test_chips.total, 110)
Пример #2
0
 def test_take_bet_not_enough_chips(self):
     test_chips = game.Chips()
     response = game.take_bet(test_chips, 250)
     self.assertEqual(response,
                      "Sorry, you do not have enough chips!. You have 100")
Пример #3
0
    def test_player_busts(self):
        test_chips = game.Chips()
        test_chips.bet = 30
        game.player_busts("", "", test_chips)

        self.assertEqual(test_chips.total, 70)
Пример #4
0
 def test_take_bet_invalid_integer(self):
     test_chips = game.Chips()
     response = game.take_bet(test_chips, "wrong_int")
     self.assertEqual(response, "Sorry, please provide a valid integer")