Skip to content

Commit 35bfe9e

Browse files
committed
fix tests
1 parent b5776be commit 35bfe9e

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

backend/endpoints/responses/rom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ class RomSchema(BaseModel):
256256
sha1_hash: str | None
257257

258258
# TODO: Remove this after 4.3 release
259-
multi: Annotated[int, Field(deprecated="Replaced by has_multiple_files")]
259+
multi: Annotated[bool, Field(deprecated="Replaced by has_multiple_files")]
260260
has_simple_single_file: bool
261261
has_nested_single_file: bool
262262
has_multiple_files: bool

backend/endpoints/rom.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ async def head_rom_content(
378378
if file_ids:
379379
file_id_values = {int(f.strip()) for f in file_ids.split(",") if f.strip()}
380380
files = [f for f in rom.files if f.id in file_id_values]
381-
382381
files.sort(key=lambda x: x.file_name)
383382

384383
# Serve the file directly in development mode for emulatorjs

backend/tests/handler/filesystem/test_roms_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def test_parse_tags_no_tags(self, handler: FSRomsHandler):
164164
assert languages == []
165165
assert other_tags == []
166166

167-
def testexclude_multi_roms_filters_excluded(self, handler: FSRomsHandler, config):
167+
def test_exclude_multi_roms_filters_excluded(self, handler: FSRomsHandler, config):
168168
"""Test exclude_multi_roms filters out excluded multi-file ROMs"""
169169
roms = ["Game1", "excluded_multi", "Game2", "Game3"]
170170

@@ -176,7 +176,7 @@ def testexclude_multi_roms_filters_excluded(self, handler: FSRomsHandler, config
176176

177177
assert result == expected
178178

179-
def testexclude_multi_roms_no_exclusions(self, handler: FSRomsHandler):
179+
def test_exclude_multi_roms_no_exclusions(self, handler: FSRomsHandler):
180180
"""Test exclude_multi_roms with no exclusions"""
181181
roms = ["Game1", "Game2", "Game3"]
182182
config = Config(

backend/tests/handler/test_fastapi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ async def test_scan_rom():
5151
rom=rom,
5252
fs_rom={
5353
"fs_name": "Paper Mario (USA).z64",
54+
"flat": True,
55+
"nested": False,
5456
"files": [
5557
RomFile(
5658
file_name="Paper Mario (USA).z64",
@@ -71,8 +73,7 @@ async def test_scan_rom():
7173
assert type(rom) is Rom
7274
assert rom.fs_name == "Paper Mario (USA).z64"
7375
assert rom.name == "Paper Mario"
76+
assert rom.fs_path == "n64/Paper Mario (USA)"
7477
assert rom.igdb_id == 3340
7578
assert rom.fs_size_bytes == 1024
7679
assert rom.tags == []
77-
assert rom.has_simple_single_file
78-
assert not rom.has_multiple_files

frontend/src/__generated__/models/DetailedRomSchema.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/__generated__/models/SimpleRomSchema.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)