Skip to content

Commit

Permalink
fix failed player test
Browse files Browse the repository at this point in the history
  • Loading branch information
razn committed Aug 20, 2024
1 parent 301b449 commit 8549f03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion custom/players.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def builder(self, ownership, tqdm_desc):
if Gameweek.CURRENT_GW == 0:
ep_this = 0
else:
ep_this = float(player["ep_this"]),
ep_this = float(player["ep_this"])

fixtures = {}
fdr_sum = 0
Expand Down
10 changes: 6 additions & 4 deletions tests/test_players.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,20 @@ async def mock_get_players(self):
assert players.stats == {
202: {
"web_name": "Gallagher",
"status": "",
"team_short_name": "CHE",
"pos": "MID",
"latest_price": 5.4",
"price_change": 0.0",
"xg": "0.52",
"xa": "0.76",
"latest_price": 5.4,
"price_change": 0.0,
"xg": 0.52,
"xa": 0.76,
"sum_xg_xa": 1.28,
"pts_prev_n_gw": {5: 3, 6: 2},
"total_pts_prev_n_gw": 5,
"ep_this": 2.7,
"ep_next": 3.2,
"fixtures": {8: ["BUR (A) (1.0)"], 9: ["ARS (H) (4.38)"]},
"fdr_avg": 2.7,
"weighted_value": 1.4,
}
}

0 comments on commit 8549f03

Please sign in to comment.