From 8549f03556b3ff3bbee85580d2d27f76e9446760 Mon Sep 17 00:00:00 2001 From: razn Date: Tue, 20 Aug 2024 23:11:09 +0800 Subject: [PATCH] fix failed player test --- custom/players.py | 2 +- tests/test_players.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/custom/players.py b/custom/players.py index c489127..29ae498 100644 --- a/custom/players.py +++ b/custom/players.py @@ -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 diff --git a/tests/test_players.py b/tests/test_players.py index e1af95b..1f0a1e2 100644 --- a/tests/test_players.py +++ b/tests/test_players.py @@ -78,12 +78,13 @@ 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, @@ -91,5 +92,6 @@ async def mock_get_players(self): "ep_next": 3.2, "fixtures": {8: ["BUR (A) (1.0)"], 9: ["ARS (H) (4.38)"]}, "fdr_avg": 2.7, + "weighted_value": 1.4, } }