Skip to content

Commit

Permalink
test: fix tests (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
eikowagenknecht authored Oct 27, 2023
1 parent 5fd2890 commit e1840fc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 38 deletions.
29 changes: 14 additions & 15 deletions tests/test_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from lootscraper.utils import (
calc_real_valid_to,
clean_combined_title,
clean_game_title,
get_match_score,
)

Expand All @@ -29,37 +30,35 @@ def test_loot_title_cleaning_1(self) -> None:
title = "Tom Clancy's Rainbow Six® Siege"
cleaned = "Tom Clancy's Rainbow Six® Siege"

assert clean_combined_title(title) == cleaned
assert clean_game_title(title) == cleaned

def test_loot_title_cleaning_2(self) -> None:
title = "Lords Mobile: Warlord Pack"
cleaned = "Lords Mobile"
cleaned_game = "Lords Mobile"
cleaned_offer = "Lords Mobile - Warlord Pack"

assert clean_combined_title(title) == cleaned
assert clean_combined_title(title) == (cleaned_game, cleaned_offer)

def test_loot_title_cleaning_3(self) -> None:
title = "Mobile Legends: Bang Bang: Amazon Prime Chest"
cleaned = "Mobile Legends: Bang Bang"
cleaned_game = "Mobile Legends: Bang Bang"
cleaned_offer = "Mobile Legends: Bang Bang - Amazon Prime Chest"

assert clean_combined_title(title) == cleaned
assert clean_combined_title(title) == (cleaned_game, cleaned_offer)

def test_loot_title_cleaning_4(self) -> None:
title = "Get up to GTA$400,000 this month in GTA Online"
cleaned = "GTA Online"
cleaned_game = "GTA Online"
cleaned_offer = "GTA Online - Up to GTA$400,000 this month"

assert clean_combined_title(title) == cleaned
assert clean_combined_title(title) == (cleaned_game, cleaned_offer)

def test_loot_title_cleaning_5(self) -> None:
title = "Get up to GTA$400,000 this week in GTA Online"
cleaned = "GTA Online"

assert clean_combined_title(title) == cleaned

def test_loot_title_cleaning_6(self) -> None:
title = "World of Warships — Starter Pack: Dreadnought"
cleaned = "World of Warships"
cleaned_game = "World of Warships"
cleaned_offer = "World of Warships - Starter Pack: Dreadnought"

assert clean_combined_title(title) == cleaned
assert clean_combined_title(title) == (cleaned_game, cleaned_offer)

def test_real_valid_to_date(self) -> None:
seen_last = datetime(2020, 6, 1, 0, 0, 0, tzinfo=timezone.utc)
Expand Down
23 changes: 0 additions & 23 deletions tests/test_manual.py

This file was deleted.

0 comments on commit e1840fc

Please sign in to comment.