aboutsummaryrefslogtreecommitdiff
path: root/test/test_dailymotion_subtitles.py
diff options
context:
space:
mode:
authorIsmael Mejia <iemejia@gmail.com>2013-08-08 22:22:33 +0200
committerIsmael Mejia <iemejia@gmail.com>2013-08-08 22:22:33 +0200
commitd80a064eff4fe2416f9db36b07f1e2ca641f1334 (patch)
treecb10dcb2d7d61830e1c81619cee24c0de1871a60 /test/test_dailymotion_subtitles.py
parentd55de6eec2adf7d1aaca87e75dad06ef15d9be26 (diff)
[subtitles] Added tests to check correct behavior when no subtitles are
available
Diffstat (limited to 'test/test_dailymotion_subtitles.py')
-rw-r--r--test/test_dailymotion_subtitles.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/test_dailymotion_subtitles.py b/test/test_dailymotion_subtitles.py
index 26c40493f..efc4e574f 100644
--- a/test/test_dailymotion_subtitles.py
+++ b/test/test_dailymotion_subtitles.py
@@ -27,14 +27,14 @@ class TestDailymotionSubtitles(unittest.TestCase):
def getSubtitles(self):
info_dict = self.getInfoDict()
return info_dict[0]['subtitles']
- def test_no_subtitles(self):
+ def test_no_writesubtitles(self):
subtitles = self.getSubtitles()
self.assertEqual(subtitles, None)
def test_subtitles(self):
self.DL.params['writesubtitles'] = True
subtitles = self.getSubtitles()
self.assertEqual(md5(subtitles['en']), '976553874490cba125086bbfea3ff76f')
- def test_subtitles_fr(self):
+ def test_subtitles_lang(self):
self.DL.params['writesubtitles'] = True
self.DL.params['subtitleslang'] = 'fr'
subtitles = self.getSubtitles()
@@ -52,6 +52,11 @@ class TestDailymotionSubtitles(unittest.TestCase):
self.DL.params['subtitleslang'] = 'en'
subtitles = self.getSubtitles()
self.assertTrue(len(subtitles.keys()) == 0)
+ def test_nosubtitles(self):
+ self.url = 'http://www.dailymotion.com/video/x12u166_le-zapping-tele-star-du-08-aout-2013_tv'
+ self.DL.params['allsubtitles'] = True
+ subtitles = self.getSubtitles()
+ self.assertEqual(len(subtitles), 0)
if __name__ == '__main__':
unittest.main()