summaryrefslogtreecommitdiffstats
path: root/test/test_socks.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_socks.py')
-rw-r--r--test/test_socks.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_socks.py b/test/test_socks.py
index 43d612d..68af19d 100644
--- a/test/test_socks.py
+++ b/test/test_socks.py
@@ -95,7 +95,7 @@ class Socks5ProxyHandler(StreamRequestHandler, SocksProxyHandler):
return
elif Socks5Auth.AUTH_USER_PASS in methods:
- self.connection.sendall(struct.pack("!BB", SOCKS5_VERSION, Socks5Auth.AUTH_USER_PASS))
+ self.connection.sendall(struct.pack('!BB', SOCKS5_VERSION, Socks5Auth.AUTH_USER_PASS))
_, user_len = struct.unpack('!BB', self.connection.recv(2))
username = self.connection.recv(user_len).decode()
@@ -174,7 +174,7 @@ class Socks4ProxyHandler(StreamRequestHandler, SocksProxyHandler):
if 0x0 < dest_ip <= 0xFF:
use_remote_dns = True
else:
- socks_info['ipv4_address'] = socket.inet_ntoa(struct.pack("!I", dest_ip))
+ socks_info['ipv4_address'] = socket.inet_ntoa(struct.pack('!I', dest_ip))
user_id = self._read_until_null().decode()
if user_id != (self.socks_kwargs.get('user_id') or ''):
@@ -291,7 +291,7 @@ def ctx(request):
('Urllib', 'http'),
('Requests', 'http'),
('Websockets', 'ws'),
- ('CurlCFFI', 'http')
+ ('CurlCFFI', 'http'),
], indirect=True)
class TestSocks4Proxy:
def test_socks4_no_auth(self, handler, ctx):
@@ -366,7 +366,7 @@ class TestSocks4Proxy:
('Urllib', 'http'),
('Requests', 'http'),
('Websockets', 'ws'),
- ('CurlCFFI', 'http')
+ ('CurlCFFI', 'http'),
], indirect=True)
class TestSocks5Proxy: