1
0
Fork 0

origin.com -> ea.com

This commit is contained in:
Casper V. Kristensen 2023-02-11 01:15:10 +01:00
parent 4e9219b461
commit 2ba7cc0367
2 changed files with 5 additions and 5 deletions

View file

@ -22,7 +22,7 @@ def find_store_links(game_name: str) -> Dict[str, str]:
known_stores = {
"store.steampowered.com/(app|sub|bundle)": "Steam", # order doesn't matter
"gog.com/game": "GOG",
"origin.com": "Origin",
"ea.com": "EA",
"ubi(soft)?.com": "Ubisoft",
"www.microsoft.com/.*p": "Microsoft Store",
"store.epicgames.com": "Epic Games",

View file

@ -134,12 +134,12 @@ class ParseDirnameTestCase(unittest.TestCase):
self.assertIn("store.steampowered.com/app/57900", r2.store_links["Steam"])
self.assertGreater(r1.score, r2.score)
def test_non_steam(self):
pre = Pre("Battlefield.1.REPACK-CPY", "nfo_link", datetime.utcnow())
def test_ea(self):
pre = Pre("Madden.NFL.21.REPACK-CPY", "nfo_link", datetime.utcnow())
r = parsing.parse_pre(pre)
self.assertIn(
"www.origin.com/usa/en-us/store/battlefield/battlefield-1",
r.store_links["Origin"],
"ea.com/games/madden-nfl/madden-nfl-23",
r.store_links["EA"],
)
self.assertEqual(-1, r.score)
self.assertEqual(-1, r.num_reviews)