Beispiel #1
0
    def test_percent_score_total_possible_points_negative(self):
        # Arrange
        home_score = HomeScore()
        self.home = self.create_home(self.home_type)
        accumulated_points = 20
        total_possible_points = -30

        # Act
        home_score._accumulated_points = accumulated_points
        home_score._total_possible_points = total_possible_points

        # Assert
        self.assertEqual(-1, home_score.percent_score())
Beispiel #2
0
    def test_percent_score_accumulated_points_zero_equals_zero(self):
        # Arrange
        home_score = HomeScore()
        self.home = self.create_home(self.home_type)
        accumulated_points = 0
        total_possible_points = 30

        # Act
        home_score._accumulated_points = accumulated_points
        home_score._total_possible_points = total_possible_points
        home_score.eliminate_home()

        # Assert
        self.assertEqual(0, home_score.percent_score())