示例#1
0
 def test_attempted_three_point_field_goals_when_cells_exist(self):
     cell = MagicMock(text_content=MagicMock(return_value="some attempted three point field goals"))
     self.html.xpath = MagicMock(return_value=[cell])
     self.assertEqual(
         BasicBoxScoreRow(html=self.html).attempted_three_point_field_goals,
         "some attempted three point field goals",
     )
     self.html.xpath.assert_called_once_with('td[@data-stat="fg3a"]')
示例#2
0
 def test_attempted_free_throws_is_empty_string_when_cells_exist(self):
     self.html.xpath = MagicMock(return_value=[])
     self.assertEqual(BasicBoxScoreRow(html=self.html).attempted_free_throws, '')
     self.html.xpath.assert_called_once_with('td[@data-stat="fta"]')
示例#3
0
 def test_attempted_free_throws_when_cells_exist(self):
     cell = MagicMock(text_content=MagicMock(return_value="some attempted free throws"))
     self.html.xpath = MagicMock(return_value=[cell])
     self.assertEqual(BasicBoxScoreRow(html=self.html).attempted_free_throws, "some attempted free throws")
     self.html.xpath.assert_called_once_with('td[@data-stat="fta"]')
示例#4
0
 def test_made_field_goals_when_cells_exist(self):
     cell = MagicMock(text_content=MagicMock(return_value="some made field goals"))
     self.html.xpath = MagicMock(return_value=[cell])
     self.assertEqual(BasicBoxScoreRow(html=self.html).made_field_goals, "some made field goals")
     self.html.xpath.assert_called_once_with('td[@data-stat="fg"]')
示例#5
0
 def test_made_three_point_field_goals_is_empty_string_when_cells_exist(self):
     self.html.xpath = MagicMock(return_value=[])
     self.assertEqual(BasicBoxScoreRow(html=self.html).made_three_point_field_goals, '')
     self.html.xpath.assert_called_once_with('td[@data-stat="fg3"]')
示例#6
0
 def test_minutes_played_when_cells_exist(self):
     cell = MagicMock(text_content=MagicMock(return_value="some minutes played"))
     self.html.xpath = MagicMock(return_value=[cell])
     self.assertEqual(BasicBoxScoreRow(html=self.html).minutes_played, "some minutes played")
     self.html.xpath.assert_called_once_with('td[@data-stat="mp"]')
示例#7
0
 def test_minutes_played_is_empty_string_when_cells_do_not_exist(self):
     self.html.xpath = MagicMock(return_value=[])
     self.assertEqual(BasicBoxScoreRow(html=self.html).minutes_played, '')
     self.html.xpath.assert_called_once_with('td[@data-stat="mp"]')
示例#8
0
 def test_points(self):
     cell = MagicMock(text_content=MagicMock(return_value="some points"))
     self.html.xpath = MagicMock(return_value=[cell])
     self.assertEqual(BasicBoxScoreRow(html=self.html).points, "some points")
     self.html.xpath.assert_called_once_with('td[@data-stat="pts"]')
示例#9
0
 def test_personal_fouls_is_empty_string_when_cells_exist(self):
     self.html.xpath = MagicMock(return_value=[])
     self.assertEqual(BasicBoxScoreRow(html=self.html).personal_fouls, '')
     self.html.xpath.assert_called_once_with('td[@data-stat="pf"]')
示例#10
0
 def test_personal_fouls_when_cells_exist(self):
     cell = MagicMock(text_content=MagicMock(return_value="some personal fouls"))
     self.html.xpath = MagicMock(return_value=[cell])
     self.assertEqual(BasicBoxScoreRow(html=self.html).personal_fouls, "some personal fouls")
     self.html.xpath.assert_called_once_with('td[@data-stat="pf"]')
示例#11
0
 def test_defensive_rebounds_is_empty_string_when_cells_exist(self):
     self.html.xpath = MagicMock(return_value=[])
     self.assertEqual(BasicBoxScoreRow(html=self.html).defensive_rebounds, '')
     self.html.xpath.assert_called_once_with('td[@data-stat="drb"]')
示例#12
0
 def test_defensive_rebounds_when_cells_exist(self):
     cell = MagicMock(text_content=MagicMock(return_value="some defensive rebounds"))
     self.html.xpath = MagicMock(return_value=[cell])
     self.assertEqual(BasicBoxScoreRow(html=self.html).defensive_rebounds, "some defensive rebounds")
     self.html.xpath.assert_called_once_with('td[@data-stat="drb"]')