Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dnsviz/dnsviz.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCasey Deccio <casey@deccio.net>2020-11-15 09:30:44 +0300
committerCasey Deccio <casey@deccio.net>2020-11-15 09:30:44 +0300
commit8b69b6249f6f5349967716a2e74c120ac465760d (patch)
tree3e39caa38df784ee4f9787186ae6b840448ce6c3 /tests
parentcb9169976be4c6babff1c8841bd6999b8a62bf5b (diff)
Only bind ::1 if using IPv6
Diffstat (limited to 'tests')
-rw-r--r--tests/dnsviz_probe_options.py3
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):