Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
djbrown authored Mar 30, 2024
1 parent c0fe734 commit 1cc9e31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/base/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/games/tests/integration/test_import_games.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 1cc9e31

Please sign in to comment.