Change test for fake extension that wont work (#1266)

This commit is contained in:
CaliBrain
2026-08-24 17:54:10 -04:00
committed by GitHub
parent 9bcf595111
commit a5595cf9f1
5 changed files with 15 additions and 15 deletions
+6 -6
View File
@@ -1411,12 +1411,12 @@ class TestSplitMamFormats:
def test_unrecognized_only_is_surfaced(self):
from shelfmark.release_sources.prowlarr.source import _split_mam_formats
assert _split_mam_formats("The Martian by Andy Weir [ENG / MP4]") == ([], ["mp4"])
assert _split_mam_formats("The Martian by Andy Weir [ENG / AVI]") == ([], ["avi"])
def test_mixed_keeps_both_sides(self):
from shelfmark.release_sources.prowlarr.source import _split_mam_formats
assert _split_mam_formats("Title [ENG / M4B MP4]") == (["m4b"], ["mp4"])
assert _split_mam_formats("Title [ENG / M4B AVI]") == (["m4b"], ["avi"])
def test_no_structured_bracket(self):
from shelfmark.release_sources.prowlarr.source import _split_mam_formats
@@ -1428,7 +1428,7 @@ class TestSplitMamFormats:
from shelfmark.release_sources.prowlarr.source import _extract_mam_formats
assert _extract_mam_formats("Title [ENG / MP3]") == ["mp3"]
assert _extract_mam_formats("Title [ENG / MP4]") == []
assert _extract_mam_formats("Title [ENG / AVI]") == []
class TestUnrecognizedFormatOnRelease:
@@ -1449,13 +1449,13 @@ class TestUnrecognizedFormatOnRelease:
from shelfmark.release_sources.prowlarr.source import _prowlarr_result_to_release
release = _prowlarr_result_to_release(
self._result("The Martian by Andy Weir [ENG / MP4]"),
self._result("The Martian by Andy Weir [ENG / AVI]"),
"audiobook",
enable_format_detection=True,
)
assert release.format is None
assert release.extra["formats"] is None
assert release.extra["unrecognized_formats"] == ["mp4"]
assert release.extra["unrecognized_formats"] == ["avi"]
def test_recognized_format_leaves_unrecognized_empty(self):
from shelfmark.release_sources.prowlarr.source import _prowlarr_result_to_release
@@ -1472,6 +1472,6 @@ class TestUnrecognizedFormatOnRelease:
from shelfmark.release_sources.prowlarr.source import _prowlarr_result_to_release
release = _prowlarr_result_to_release(
self._result("The Martian by Andy Weir [ENG / MP4]"), "audiobook"
self._result("The Martian by Andy Weir [ENG / AVI]"), "audiobook"
)
assert release.extra["unrecognized_formats"] is None