tests for captions
Browse files- tests/test_cli.py +3 -1
- tests/test_streams.py +8 -0
tests/test_cli.py
CHANGED
@@ -213,5 +213,7 @@ def test_download_by_resolution_not_exists(youtube, stream_query):
|
|
213 |
youtube.streams = stream_query
|
214 |
cli._download = MagicMock()
|
215 |
with pytest.raises(SystemExit):
|
216 |
-
cli.download_by_resolution(
|
|
|
|
|
217 |
cli._download.assert_not_called()
|
|
|
213 |
youtube.streams = stream_query
|
214 |
cli._download = MagicMock()
|
215 |
with pytest.raises(SystemExit):
|
216 |
+
cli.download_by_resolution(
|
217 |
+
youtube=youtube, resolution="DOESNT EXIST", target="test_target"
|
218 |
+
)
|
219 |
cli._download.assert_not_called()
|
tests/test_streams.py
CHANGED
@@ -36,6 +36,14 @@ def test_title(cipher_signature):
|
|
36 |
assert stream.title == expected
|
37 |
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
def test_description(cipher_signature):
|
40 |
expected = (
|
41 |
"PSY - ‘I LUV IT’ M/V @ https://youtu.be/Xvjnoagk6GU\n"
|
|
|
36 |
assert stream.title == expected
|
37 |
|
38 |
|
39 |
+
def test_caption_tracks(presigned_video):
|
40 |
+
assert len(presigned_video.caption_tracks) == 13
|
41 |
+
|
42 |
+
|
43 |
+
def test_captions(presigned_video):
|
44 |
+
assert len(presigned_video.captions.all()) == 13
|
45 |
+
|
46 |
+
|
47 |
def test_description(cipher_signature):
|
48 |
expected = (
|
49 |
"PSY - ‘I LUV IT’ M/V @ https://youtu.be/Xvjnoagk6GU\n"
|