diff --git a/backend/exceptions/fs_exceptions.py b/backend/exceptions/fs_exceptions.py index 0c02c4233..9ca668d08 100644 --- a/backend/exceptions/fs_exceptions.py +++ b/backend/exceptions/fs_exceptions.py @@ -50,14 +50,14 @@ class RomAlreadyExistsException(Exception): class RomListedByPlaylistException(Exception): - def __init__(self, playlist: str): + def __init__(self, playlist: str) -> None: self.message = ( f"{playlist} lists this disc, so moving it into a folder would break " "the playlist. Move the set into a folder of its own first" ) super().__init__(self.message) - def __repr__(self): + def __repr__(self) -> str: return self.message diff --git a/backend/tests/endpoints/roms/test_upload.py b/backend/tests/endpoints/roms/test_upload.py index 7faee648f..f039c4c87 100644 --- a/backend/tests/endpoints/roms/test_upload.py +++ b/backend/tests/endpoints/roms/test_upload.py @@ -882,6 +882,7 @@ def test_start_into_a_file_a_playlist_lists_returns_400( platform: Platform, admin_user: User, rom_upload_fs: Path, + tmp_path: Path, ): rom = _single_file_rom(platform, admin_user, rom_upload_fs) _write(rom_upload_fs, f"{rom.fs_path}/solo.m3u", b"solo.zip\n") @@ -892,7 +893,7 @@ def test_start_into_a_file_a_playlist_lists_returns_400( assert response.status_code == status.HTTP_400_BAD_REQUEST assert "solo.m3u" in response.json()["detail"] - assert not upload_endpoint.ROM_UPLOAD_TMP_BASE.exists() + assert not (tmp_path / "uploads").exists() assert (rom_upload_fs / rom.fs_path / "solo.zip").read_bytes() == b"romdata"