mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-01-05 21:48:54 +01:00
Fix for Python3.5.
This commit is contained in:
parent
021e6f57af
commit
99050aacb3
@ -1,4 +1,5 @@
|
||||
from mock import patch, call
|
||||
import sys
|
||||
import io
|
||||
import socket
|
||||
|
||||
@ -162,4 +163,9 @@ def test_family_ip_tuple():
|
||||
def test_family_to_string():
|
||||
assert sshuttle.helpers.family_to_string(socket.AF_INET) == "AF_INET"
|
||||
assert sshuttle.helpers.family_to_string(socket.AF_INET6) == "AF_INET6"
|
||||
assert sshuttle.helpers.family_to_string(socket.AF_UNIX) == "1"
|
||||
if sys.version_info < (3, 0):
|
||||
expected = "1"
|
||||
assert sshuttle.helpers.family_to_string(socket.AF_UNIX) == "1"
|
||||
else:
|
||||
expected = 'AddressFamily.AF_UNIX'
|
||||
assert sshuttle.helpers.family_to_string(socket.AF_UNIX) == expected
|
||||
|
Loading…
Reference in New Issue
Block a user