summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorVitiko <[email protected]>2022-01-01 19:20:33 -0400
committerVitiko <[email protected]>2022-01-01 19:20:33 -0400
commit68a9f2fb0c14ed2f844980ca63a704dd0afab340 (patch)
treedf793e404aa85eecb401307a570df02e4dbeab08 /tests
parent1261e91870a6e08b1942c7a2fbcb74b19d0da4c9 (diff)
downloadbazarr-68a9f2fb0c14ed2f844980ca63a704dd0afab340.tar.gz
bazarr-68a9f2fb0c14ed2f844980ca63a704dd0afab340.zip
Handle InvalidFile with Embedded Subtitles Provider (close #1652)
Diffstat (limited to 'tests')
-rw-r--r--tests/subliminal_patch/test_embeddedsubtitles.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/subliminal_patch/test_embeddedsubtitles.py b/tests/subliminal_patch/test_embeddedsubtitles.py
index c9c8e7cd5..e42330425 100644
--- a/tests/subliminal_patch/test_embeddedsubtitles.py
+++ b/tests/subliminal_patch/test_embeddedsubtitles.py
@@ -6,6 +6,7 @@ import pytest
import fese
from fese import FFprobeSubtitleStream
from subliminal_patch.core import Episode, Movie
+from subliminal_patch.exceptions import MustGetBlacklisted
from subliminal_patch.providers.embeddedsubtitles import EmbeddedSubtitlesProvider
from subzero.language import Language
@@ -223,5 +224,8 @@ def test_download_invalid_subtitle(video_single_language):
provider._cached_paths[subtitle.container.path] = {
subtitle.stream.index: "dummy.srt"
}
- with pytest.raises(fese.InvalidFile):
+ try:
provider.download_subtitle(subtitle)
+ except MustGetBlacklisted as error:
+ assert error.id == subtitle.id
+ assert error.media_type == subtitle.media_type