This test broke in Python3.11

Fixed the test and only check for instance: str for families that are
not explicitly covered in `family_to_str`

closes: #784
This commit is contained in:
Bastian Venthur 2022-08-29 10:28:45 +02:00 committed by Brian May
parent f8086dfa59
commit a6efc6b653

View File

@ -192,5 +192,4 @@ def test_family_ip_tuple():
def test_family_to_string():
assert sshuttle.helpers.family_to_string(AF_INET) == "AF_INET"
assert sshuttle.helpers.family_to_string(AF_INET6) == "AF_INET6"
expected = 'AddressFamily.AF_UNIX'
assert sshuttle.helpers.family_to_string(socket.AF_UNIX) == expected
assert isinstance(sshuttle.helpers.family_to_string(socket.AF_UNIX), str)