We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 021e6f5 commit 99050aaCopy full SHA for 99050aa
sshuttle/tests/test_helpers.py
@@ -1,4 +1,5 @@
1
from mock import patch, call
2
+import sys
3
import io
4
import socket
5
@@ -162,4 +163,9 @@ def test_family_ip_tuple():
162
163
def test_family_to_string():
164
assert sshuttle.helpers.family_to_string(socket.AF_INET) == "AF_INET"
165
assert sshuttle.helpers.family_to_string(socket.AF_INET6) == "AF_INET6"
- assert sshuttle.helpers.family_to_string(socket.AF_UNIX) == "1"
166
+ if sys.version_info < (3, 0):
167
+ expected = "1"
168
+ assert sshuttle.helpers.family_to_string(socket.AF_UNIX) == "1"
169
+ else:
170
+ expected = 'AddressFamily.AF_UNIX'
171
+ assert sshuttle.helpers.family_to_string(socket.AF_UNIX) == expected
0 commit comments