1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Description: Fix test expecting the machine to have a public IP Address
Author: Joseph Nahmias <joe@nahmias.net>
Last-Update: 2020-09-06
Forwarded: not-needed
--- ipyparallel.orig/ipyparallel/tests/test_util.py
+++ ipyparallel/ipyparallel/tests/test_util.py
@@ -10,7 +10,6 @@
@mock.patch('warnings.warn')
def test_disambiguate_ip(warn_mock):
# garbage in, garbage out
- public_ip = public_ips()[0]
assert util.disambiguate_ip_address('garbage') == 'garbage'
assert util.disambiguate_ip_address('0.0.0.0', socket.gethostname()) == localhost()
wontresolve = 'this.wontresolve.dns'
@@ -20,4 +19,5 @@
'[Errno -2] Name or service not known'.format(wontresolve),
RuntimeWarning,
)
- assert util.disambiguate_ip_address('0.0.0.0', public_ip) == localhost()
+ for ip in public_ips():
+ assert util.disambiguate_ip_address('0.0.0.0', ip) == localhost()
|