mirror of
https://github.com/rommapp/romm.git
synced 2026-10-12 02:21:58 +00:00
test(feeds): give pkgj feed tests RomFile rows so they exercise output
The five pkgj feed tests created a ROM but no RomFile, so the per-file feeds emitted only a header and the "in response.text" assertions never actually verified output (pre-existing failures, also red on master). Add a top-level `.pkg` GAME file (games feeds) or a DLC-category file (dlc feeds), mirroring the pkgi_ps3 test, so the feeds produce rows. This also gives real coverage of the new `include_files=True` path that these feeds rely on. https://claude.ai/code/session_01PSXKmejPRzdxLFMN6P2QQ4
This commit is contained in:
@@ -293,6 +293,17 @@ def test_pkgj_psp_games_feed(
|
||||
},
|
||||
)
|
||||
|
||||
db_rom_handler.add_rom_file(
|
||||
RomFile(
|
||||
rom_id=rom.id,
|
||||
file_name="Test PSP Game.pkg",
|
||||
file_path=f"{platform.slug}/roms",
|
||||
file_size_bytes=456,
|
||||
sha1_hash="beadfeed",
|
||||
category=RomFileCategory.GAME,
|
||||
)
|
||||
)
|
||||
|
||||
response = client.get(
|
||||
"/api/feeds/pkgj/psp/games",
|
||||
headers={"Authorization": f"Bearer {access_token}"},
|
||||
@@ -325,6 +336,17 @@ def test_pkgj_psp_dlc_feed(
|
||||
},
|
||||
)
|
||||
|
||||
db_rom_handler.add_rom_file(
|
||||
RomFile(
|
||||
rom_id=rom.id,
|
||||
file_name="Test PSP DLC.pkg",
|
||||
file_path=f"{platform.slug}/roms",
|
||||
file_size_bytes=456,
|
||||
sha1_hash="beadfeed",
|
||||
category=RomFileCategory.DLC,
|
||||
)
|
||||
)
|
||||
|
||||
response = client.get(
|
||||
"/api/feeds/pkgj/psp/dlc",
|
||||
headers={"Authorization": f"Bearer {access_token}"},
|
||||
@@ -357,6 +379,17 @@ def test_pkgj_psvita_games_feed(
|
||||
},
|
||||
)
|
||||
|
||||
db_rom_handler.add_rom_file(
|
||||
RomFile(
|
||||
rom_id=rom.id,
|
||||
file_name="Test PSV Game.pkg",
|
||||
file_path=f"{platform.slug}/roms",
|
||||
file_size_bytes=456,
|
||||
sha1_hash="beadfeed",
|
||||
category=RomFileCategory.GAME,
|
||||
)
|
||||
)
|
||||
|
||||
response = client.get(
|
||||
"/api/feeds/pkgj/psvita/games",
|
||||
headers={"Authorization": f"Bearer {access_token}"},
|
||||
@@ -389,6 +422,17 @@ def test_pkgj_psvita_dlc_feed(
|
||||
},
|
||||
)
|
||||
|
||||
db_rom_handler.add_rom_file(
|
||||
RomFile(
|
||||
rom_id=rom.id,
|
||||
file_name="Test PSV DLC.pkg",
|
||||
file_path=f"{platform.slug}/roms",
|
||||
file_size_bytes=456,
|
||||
sha1_hash="beadfeed",
|
||||
category=RomFileCategory.DLC,
|
||||
)
|
||||
)
|
||||
|
||||
response = client.get(
|
||||
"/api/feeds/pkgj/psvita/dlc",
|
||||
headers={"Authorization": f"Bearer {access_token}"},
|
||||
@@ -420,6 +464,17 @@ def test_pkgj_psx_games_feed(
|
||||
},
|
||||
)
|
||||
|
||||
db_rom_handler.add_rom_file(
|
||||
RomFile(
|
||||
rom_id=rom.id,
|
||||
file_name="Test PSX Game.pkg",
|
||||
file_path=f"{platform.slug}/roms",
|
||||
file_size_bytes=456,
|
||||
sha1_hash="beadfeed",
|
||||
category=RomFileCategory.GAME,
|
||||
)
|
||||
)
|
||||
|
||||
response = client.get(
|
||||
"/api/feeds/pkgj/psx/games",
|
||||
headers={"Authorization": f"Bearer {access_token}"},
|
||||
|
||||
Reference in New Issue
Block a user