示例#1
0
 def test_eliminate_home(self):
     # Arrange // not really following methodology
     home_score = HomeScore()
     self.home = self.create_home(self.home_type)
     self.assertFalse(home_score.eliminated)
     home_score.eliminate_home()
     self.assertTrue(home_score.eliminated)
示例#2
0
    def test_percent_score_total_possible_points_negative_eliminated(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
        home_score.eliminate_home()

        # Assert
        self.assertEqual(-1, home_score.percent_score())
示例#3
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())