diff options
author | Filippo Valsorda <filippo.valsorda@gmail.com> | 2013-10-05 15:55:58 -0400 |
---|---|---|
committer | Filippo Valsorda <filippo.valsorda@gmail.com> | 2013-10-05 15:55:58 -0400 |
commit | 00fcc17aeeab11ce694699bf183d33a3af75aab6 (patch) | |
tree | 2648e538ae2decba9b8eabf2da73101c1d38954e /test/test_dailymotion_subtitles.py | |
parent | e94b783c741b720ab4ee70eb7fc8764be89d63d5 (diff) |
add capability to suppress expected warnings in tests
Diffstat (limited to 'test/test_dailymotion_subtitles.py')
-rw-r--r-- | test/test_dailymotion_subtitles.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_dailymotion_subtitles.py b/test/test_dailymotion_subtitles.py index 83c65d57e..ed2ad311d 100644 --- a/test/test_dailymotion_subtitles.py +++ b/test/test_dailymotion_subtitles.py @@ -2,8 +2,6 @@ import sys import unittest -import json -import io import hashlib # Allow direct execution @@ -45,15 +43,18 @@ class TestDailymotionSubtitles(unittest.TestCase): subtitles = self.getSubtitles() self.assertEqual(len(subtitles.keys()), 5) def test_list_subtitles(self): + self.DL.expect_warning(u'Automatic Captions not supported by this server') self.DL.params['listsubtitles'] = True info_dict = self.getInfoDict() self.assertEqual(info_dict, None) def test_automatic_captions(self): + self.DL.expect_warning(u'Automatic Captions not supported by this server') self.DL.params['writeautomaticsub'] = True self.DL.params['subtitleslang'] = ['en'] subtitles = self.getSubtitles() self.assertTrue(len(subtitles.keys()) == 0) def test_nosubtitles(self): + self.DL.expect_warning(u'video doesn\'t have subtitles') self.url = 'http://www.dailymotion.com/video/x12u166_le-zapping-tele-star-du-08-aout-2013_tv' self.DL.params['writesubtitles'] = True self.DL.params['allsubtitles'] = True |