summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tests/test_validate.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tests/test_validate.py b/src/tests/test_validate.py
index 226e856a3..b43dbd97e 100644
--- a/src/tests/test_validate.py
+++ b/src/tests/test_validate.py
@@ -21,6 +21,11 @@ class TestVyOSValidate(TestCase):
def setUp(self):
pass
+ def test_is_addr_assigned(self):
+ self.assertTrue(vyos.validate.is_addr_assigned('127.0.0.1'))
+ self.assertTrue(vyos.validate.is_addr_assigned('::1'))
+ self.assertFalse(vyos.validate.is_addr_assigned('127.251.255.123'))
+
def test_is_ipv6_link_local(self):
self.assertFalse(vyos.validate.is_ipv6_link_local('169.254.0.1'))
self.assertTrue(vyos.validate.is_ipv6_link_local('fe80::'))