Ejemplo n.º 1
0
 def test_goal_difference_and_shootout_guessed_bet(self):
     result = calc_bet_result(
         home_bet=1,
         away_bet=0,
         home_score=4,
         away_score=3,
         shootout_bet=False,
         shootout_winner=False,
     )
     self.assertEqual(result, 10)
Ejemplo n.º 2
0
 def test_score_guessed_but_not_shootout_bet(self):
     result = calc_bet_result(
         home_bet=4,
         away_bet=3,
         home_score=4,
         away_score=3,
         shootout_bet=False,
         shootout_winner=True,
     )
     self.assertEqual(result, 12)
Ejemplo n.º 3
0
 def test_diff_not_guessed_but_shootout_guessed_bet(self):
     # if user bet on different diff he couldn't bet on penalties
     result = calc_bet_result(
         home_bet=0,
         away_bet=4,
         home_score=4,
         away_score=3,
         shootout_bet=True,
         shootout_winner=True,
     )
     self.assertEqual(result, 1)
Ejemplo n.º 4
0
 def test_score_guessed_bet(self):
     result = calc_bet_result(home_bet=4,
                              away_bet=3,
                              home_score=4,
                              away_score=3)
     self.assertEqual(result, 12)
Ejemplo n.º 5
0
 def test_any_wrong_bet(self):
     result = calc_bet_result(home_bet=0,
                              away_bet=0,
                              home_score=4,
                              away_score=3)
     self.assertEqual(result, 1)
Ejemplo n.º 6
0
 def test_goal_difference_guessed_bet(self):
     result = calc_bet_result(home_bet=1,
                              away_bet=0,
                              home_score=4,
                              away_score=3)
     self.assertEqual(result, 6)
Ejemplo n.º 7
0
 def test_result_and_one_team_goals_guessed_bet(self):
     result = calc_bet_result(home_bet=5,
                              away_bet=3,
                              home_score=4,
                              away_score=3)
     self.assertEqual(result, 5)
Ejemplo n.º 8
0
 def test_result_guessed_win_bet(self):
     result = calc_bet_result(home_bet=2,
                              away_bet=0,
                              home_score=4,
                              away_score=3)
     self.assertEqual(result, 3)
Ejemplo n.º 9
0
 def test_total_goals_guessed_less_4_bet(self):
     result = calc_bet_result(home_bet=1,
                              away_bet=2,
                              home_score=2,
                              away_score=1)
     self.assertEqual(result, 1)