diff options
author | Casey Deccio <casey@deccio.net> | 2020-11-15 09:30:44 +0300 |
---|---|---|
committer | Casey Deccio <casey@deccio.net> | 2020-11-15 09:30:44 +0300 |
commit | 8b69b6249f6f5349967716a2e74c120ac465760d (patch) | |
tree | 3e39caa38df784ee4f9787186ae6b840448ce6c3 /tests | |
parent | cb9169976be4c6babff1c8841bd6999b8a62bf5b (diff) |
Only bind ::1 if using IPv6
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dnsviz_probe_options.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/dnsviz_probe_options.py b/tests/dnsviz_probe_options.py index 9f08185..fac9f29 100644 --- a/tests/dnsviz_probe_options.py +++ b/tests/dnsviz_probe_options.py @@ -369,7 +369,8 @@ class DNSVizProbeOptionsTestCase(unittest.TestCase): def test_bindable_ip(self): self.assertEqual(ArgHelper.bindable_ip('127.0.0.1'), IPAddr('127.0.0.1')) - self.assertEqual(ArgHelper.bindable_ip('::1'), IPAddr('::1')) + if self.use_ipv6: + self.assertEqual(ArgHelper.bindable_ip('::1'), IPAddr('::1')) # invalid IPv4 address with self.assertRaises(argparse.ArgumentTypeError): |