]> jfr.im git - yt-dlp.git/blobdiff - test/test_age_restriction.py
[cleanup] Consistent style for file heads
[yt-dlp.git] / test / test_age_restriction.py
index 5be065c437ae978d8c4ccc1a67bea87a599a77ed..ff248432b9ca070151f95816e1e26b0c2daa9023 100644 (file)
@@ -1,16 +1,15 @@
-#!/usr/bin/env python
-from __future__ import unicode_literals
+#!/usr/bin/env python3
 
 # Allow direct execution
 import os
 import sys
 import unittest
-sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
-from test.helper import try_rm
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
 
-from youtube_dl import YoutubeDL
+from test.helper import is_download_test, try_rm
+from yt_dlp import YoutubeDL
 
 
 def _download_restricted(url, filename, age):
@@ -32,6 +31,7 @@ def _download_restricted(url, filename, age):
     return res
 
 
+@is_download_test
 class TestAgeRestriction(unittest.TestCase):
     def _assert_restricted(self, url, filename, age, old_age=None):
         self.assertTrue(_download_restricted(url, filename, old_age))
@@ -45,11 +45,6 @@ def test_youporn(self):
             'http://www.youporn.com/watch/505835/sex-ed-is-it-safe-to-masturbate-daily/',
             '505835.mp4', 2, old_age=25)
 
-    def test_pornotube(self):
-        self._assert_restricted(
-            'http://pornotube.com/c/173/m/1689755/Marilyn-Monroe-Bathing',
-            '1689755.flv', 13)
-
 
 if __name__ == '__main__':
     unittest.main()