summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorVitiko <[email protected]>2022-11-08 23:12:50 -0400
committerVitiko <[email protected]>2022-11-08 23:12:50 -0400
commitd6883c2c7323641035537ba7b306808524e721db (patch)
tree67ea601f712a0a605432d58a555981a1434fda54 /tests
parent1ba94041299ecdd054e19c1ee4178dde115af076 (diff)
downloadbazarr-d6883c2c7323641035537ba7b306808524e721db.tar.gz
bazarr-d6883c2c7323641035537ba7b306808524e721db.zip
Subf2m Provider: improve series title matches
Diffstat (limited to 'tests')
-rw-r--r--tests/subliminal_patch/test_subf2m.py25
1 files changed, 13 insertions, 12 deletions
diff --git a/tests/subliminal_patch/test_subf2m.py b/tests/subliminal_patch/test_subf2m.py
index 5846971b3..47a823bfc 100644
--- a/tests/subliminal_patch/test_subf2m.py
+++ b/tests/subliminal_patch/test_subf2m.py
@@ -28,22 +28,23 @@ def test_search_movie(movies, title, year, expected_url):
@pytest.mark.parametrize(
- "title,season,expected_url",
+ "series_title,season,year,expected_url",
[
- ("Breaking Bad", 1, "/subtitles/breaking-bad-first-season"),
- ("House Of The Dragon", 1, "/subtitles/house-of-the-dragon-first-season"),
- ("The Bear", 1, "/subtitles/the-bear-first-season"),
- ("Courage the Cowardly Dog", 1, "/subtitles/courage-the-cowardly-dog"),
+ ("Breaking Bad", 1, None, "/subtitles/breaking-bad-first-season"),
+ ("House Of The Dragon", 1, None, "/subtitles/house-of-the-dragon-first-season"),
+ ("The Bear", 1, None, "/subtitles/the-bear-first-season"),
+ ("Courage the Cowardly Dog", 1, None, "/subtitles/courage-the-cowardly-dog"),
+ (
+ "The Twilight Zone",
+ 2,
+ 1959,
+ "/subtitles/the-twilight-zone-the-complete-original-series",
+ ),
],
)
-def test_search_tv_show_season(episodes, title, season, expected_url):
- episode = list(episodes.values())[0]
- episode.name = title
- episode.series = title
- episode.season = season
-
+def test_search_tv_show_season(series_title, season, year, expected_url):
with Subf2mProvider() as provider:
- result = provider._search_tv_show_season(episode.series, episode.season)
+ result = provider._search_tv_show_season(series_title, season, year)
assert result == expected_url