Exemplo n.º 1
0
 def test_roster_in_json(self,):
     expected = {
         'fantasy_content': {
             'roster': {
                 'coverage_type':'date',
                 'date':'2015-01-01',
                 'players':[
                     {"player_key": "242.p.8332","position":"WR"},
                     {"player_key": "242.p.8334","position":"LR"}
                 ]
             }
         }
     }
     logging.debug(pretty_json(self.roster.to_json()))
     self.assertEqual(expected, self.roster.json)
Exemplo n.º 2
0
 def test_roster_in_json(self,):
     expected = {
         "fantasy_content": {
             "roster": {
                 "coverage_type": "date",
                 "date": "2015-01-01",
                 "players": [
                     {"player_key": "242.p.8332", "position": "WR"},
                     {"player_key": "242.p.8334", "position": "WL"},
                 ],
             }
         }
     }
     logging.debug(pretty_json(self.roster.to_json()))
     self.assertEqual(expected, self.roster.json)
Exemplo n.º 3
0
 def test_roster_in_json(self, ):
     expected = {
         'fantasy_content': {
             'roster': {
                 'coverage_type':
                 'date',
                 'date':
                 '2015-01-01',
                 'players': [{
                     "player_key": "242.p.8332",
                     "position": "WR"
                 }, {
                     "player_key": "242.p.8334",
                     "position": "LR"
                 }]
             }
         }
     }
     logging.debug(pretty_json(self.roster.to_json()))
     self.assertEqual(expected, self.roster.json)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 def test_get_teams_roster_players(self,):
     response = self.yfs.get_teams_roster(["346.l.1328.t.12"], players="metadata")
     logging.debug(pretty_json(response.content))
     self.assertEqual(response.status_code, 200)
Exemplo n.º 6
0
 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)