]> jfr.im git - yt-dlp.git/blobdiff - test/test_socks.py
[cleanup] Consistent style for file heads
[yt-dlp.git] / test / test_socks.py
index a8b068cddb7eaaf2343106e660028593f80b7e7d..159faf58edaabb0f7f8997adf34f4b9815f6cb6c 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+
 # Allow direct execution
 import os
 import sys
@@ -6,11 +7,13 @@
 
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
+
 import random
 import subprocess
-from test.helper import FakeYDL, get_params, is_download_test
+import urllib.request
 
-from yt_dlp.compat import compat_str, compat_urllib_request
+from test.helper import FakeYDL, get_params, is_download_test
+from yt_dlp.compat import compat_str
 
 
 @is_download_test
@@ -51,7 +54,7 @@ def test_secondary_proxy_http(self):
         if params is None:
             return
         ydl = FakeYDL()
-        req = compat_urllib_request.Request('http://yt-dl.org/ip')
+        req = urllib.request.Request('http://yt-dl.org/ip')
         req.add_header('Ytdl-request-proxy', params['secondary_proxy'])
         self.assertEqual(
             ydl.urlopen(req).read().decode(),
@@ -62,7 +65,7 @@ def test_secondary_proxy_https(self):
         if params is None:
             return
         ydl = FakeYDL()
-        req = compat_urllib_request.Request('https://yt-dl.org/ip')
+        req = urllib.request.Request('https://yt-dl.org/ip')
         req.add_header('Ytdl-request-proxy', params['secondary_proxy'])
         self.assertEqual(
             ydl.urlopen(req).read().decode(),