aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_socks.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-06-24 13:40:17 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-06-25 00:08:55 +0530
commitac668111128b5f124b4271b3aa4c35f6e71a4749 (patch)
tree2a824880c707248076748070f7505cfb05200399 /test/test_socks.py
parent3c5386cd711a5a0480a0b8d72e9df5007b10ac92 (diff)
downloadhypervideo-pre-ac668111128b5f124b4271b3aa4c35f6e71a4749.tar.lz
hypervideo-pre-ac668111128b5f124b4271b3aa4c35f6e71a4749.tar.xz
hypervideo-pre-ac668111128b5f124b4271b3aa4c35f6e71a4749.zip
[compat] Remove more functions
Removing any more will require changes to a large number of extractors
Diffstat (limited to 'test/test_socks.py')
-rw-r--r--test/test_socks.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/test_socks.py b/test/test_socks.py
index a8b068cdd..0b8e03a9f 100644
--- a/test/test_socks.py
+++ b/test/test_socks.py
@@ -8,9 +8,10 @@ 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 +52,7 @@ class TestMultipleSocks(unittest.TestCase):
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 +63,7 @@ class TestMultipleSocks(unittest.TestCase):
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(),