Swap passed addr for string rather than ipaddress object.

This commit is contained in:
Gareth J. Greenaway 2019-01-24 15:04:27 -08:00
parent 87f3972606
commit c847f54293
No known key found for this signature in database
GPG key ID: 10B62F8A7CAD7A41

View file

@ -252,21 +252,20 @@ class NetworkTestCase(TestCase):
def close(self, *args, **kwargs):
pass
_ip = ipaddress.ip_address
hosts = [
{'host': _ip('10.10.0.3'),
{'host': '10.10.0.3',
'port': '',
'mocked': [(2, 1, 6, '', ('10.10.0.3', 0))],
'ret': '10.10.0.3'},
{'host': _ip('10.10.0.3'),
{'host': '10.10.0.3',
'port': '1234',
'mocked': [(2, 1, 6, '', ('10.10.0.3', 0))],
'ret': '10.10.0.3'},
{'host': _ip('2001:0db8:85a3::8a2e:0370:7334'),
{'host': '2001:0db8:85a3::8a2e:0370:7334',
'port': '',
'mocked': [(10, 1, 6, '', ('2001:db8:85a3::8a2e:370:7334', 0, 0, 0))],
'ret': '2001:db8:85a3::8a2e:370:7334'},
{'host': _ip('2001:0db8:85a3::8a2e:370:7334'),
{'host': '2001:0db8:85a3::8a2e:370:7334',
'port': '1234',
'mocked': [(10, 1, 6, '', ('2001:db8:85a3::8a2e:370:7334', 0, 0, 0))],
'ret': '2001:db8:85a3::8a2e:370:7334'},