mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 23:42:07 +01:00
Default to empty string idgb id
This commit is contained in:
@@ -154,7 +154,7 @@ class IGDBHandler:
|
||||
or self._search_rom(uc(search_term), p_igdb_id)
|
||||
)
|
||||
|
||||
r_igdb_id = res.get("id", 0)
|
||||
r_igdb_id = res.get("id", "")
|
||||
r_slug = res.get("slug", "")
|
||||
r_name = res.get("name", search_term)
|
||||
summary = res.get("summary", "")
|
||||
|
||||
@@ -28,7 +28,7 @@ def test_get_rom():
|
||||
assert urlparse(rom["url_screenshots"][0]).hostname == "images.igdb.com"
|
||||
|
||||
rom = igdbh.get_rom("Not a real game title", 4)
|
||||
assert rom["r_igdb_id"] == 0
|
||||
assert rom["r_igdb_id"] == ""
|
||||
assert rom["r_slug"] == ""
|
||||
assert rom["r_name"] == "Not a real game title"
|
||||
assert not rom["summary"]
|
||||
@@ -39,7 +39,7 @@ def test_get_rom():
|
||||
@pytest.mark.vcr()
|
||||
def test_get_ps2_opl_rom():
|
||||
rom = igdbh.get_rom("WWE Smack.iso", 8)
|
||||
assert rom["r_igdb_id"] == 0
|
||||
assert rom["r_igdb_id"] == ""
|
||||
assert rom["r_slug"] == ""
|
||||
assert rom["r_name"] == "WWE Smack"
|
||||
assert not rom["summary"]
|
||||
|
||||
Reference in New Issue
Block a user