class TestPlayer(unittest.TestCase): def setUp(self,): self.player = Player("242.p.8332", "WR") def test_player_in_xml(self,): expected = b"<player><player_key>242.p.8332</player_key><position>WR</position></player>" logging.debug(pretty_xml(self.player.to_xml())) self.assertEqual(expected, self.player.to_xml()) def test_player_in_json(self,): expected = {"player_key": "242.p.8332", "position": "WR"} logging.debug(pretty_json(self.player.to_json())) self.assertEqual(expected, self.player.json)
class TestPlayer(unittest.TestCase): def setUp(self, ): self.player = Player('242.p.8332', 'WR') def test_player_in_xml(self, ): expected = b'<player><player_key>242.p.8332</player_key><position>WR</position></player>' logging.debug(pretty_xml(self.player.to_xml())) self.assertEqual(expected, self.player.to_xml()) def test_player_in_json(self, ): expected = {"player_key": "242.p.8332", "position": "WR"} logging.debug(pretty_json(self.player.to_json())) self.assertEqual(expected, self.player.json)
def setUp(self,): self.player = Player('242.p.8332','WR')
def setUp(self,): self.player = Player("242.p.8332", "WR")
def setUp(self, ): players = [Player('242.p.8332', 'WR'), Player('242.p.8334', 'LR')] self.roster = Roster(players, date='2015-01-01')
def setUp(self, ): self.player = Player('242.p.8332', 'WR')