From df82e621e3daa3e545a5258418134303a3dd2f89 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 10 Dec 2020 19:09:36 +0100 Subject: test: vyos.validate: check is_addr_assigned() --- src/tests/test_validate.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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::')) -- cgit v1.2.3