From 1cc9e3159dd2006591c4d7a2ad6922aa7235bd1b Mon Sep 17 00:00:00 2001 From: Daniel Brown Date: Sat, 30 Mar 2024 20:30:09 +0000 Subject: [PATCH] fix test --- src/base/logic.py | 7 ++----- src/games/tests/integration/test_import_games.py | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/base/logic.py b/src/base/logic.py index cfaccb5d..ac3bb0d5 100644 --- a/src/base/logic.py +++ b/src/base/logic.py @@ -36,12 +36,9 @@ def add_ranking_place(items: list, field: str): def scrape_game( game_row, league: League, - ignore_list: list[int] | None = None, + whitelist: list[int] | None = None, processed_sports_halls: set[int] | None = None, ): - if ignore_list is None: - ignore_list = [] - if processed_sports_halls is None: processed_sports_halls = set() @@ -51,7 +48,7 @@ def scrape_game( number = int(game_row[1].text) - if ignore_list and number not in ignore_list: + if whitelist and number not in whitelist: LOGGER.debug("SKIPPING Game (options): %s", number) return diff --git a/src/games/tests/integration/test_import_games.py b/src/games/tests/integration/test_import_games.py index b6ecfbe9..f1d293f9 100644 --- a/src/games/tests/integration/test_import_games.py +++ b/src/games/tests/integration/test_import_games.py @@ -92,7 +92,7 @@ def test_update_game(self): number=1, name="My Gym", address="addr", phone_number="tel", latitude="10", longitude="20", bhv_id=3 ) - logic.scrape_game(game_row, league, sports_hall) + logic.scrape_game(game_row, league) game = self.assert_objects(Game)