def test_local_auto_with_static_address_without_ra_server(self, nic0): ipwrapper.addrAdd(nic0, '2001::88', IPV6_PREFIX_LENGTH, family=6) ip_addrs = addresses.getIpAddrs()[nic0] assert addresses.is_ipv6_local_auto(nic0) assert 2 == len(ip_addrs), ip_addrs assert addresses.is_ipv6(ip_addrs[0]) assert not addresses.is_dynamic(ip_addrs[0])
def test_local_auto_with_static_address_without_ra_server(self): with dummy_device() as dev: ipwrapper.addrAdd(dev, '2001::88', '64', family=6) ip_addrs = addresses.getIpAddrs()[dev] self.assertTrue(addresses.is_ipv6_local_auto(dev)) self.assertEqual(2, len(ip_addrs)) self.assertTrue(addresses.is_ipv6(ip_addrs[0])) self.assertTrue(not addresses.is_dynamic(ip_addrs[0]))
def test_local_auto_with_static_address_without_ra_server(self): with dummy_device() as dev: ipwrapper.addrAdd(dev, '2001::88', '64', family=6) ip_addrs = addresses.getIpAddrs()[dev] self.assertTrue(addresses.is_ipv6_local_auto(dev)) self.assertEqual(2, len(ip_addrs), ip_addrs) self.assertTrue(addresses.is_ipv6(ip_addrs[0])) self.assertTrue(not addresses.is_dynamic(ip_addrs[0]))
def test_local_auto_with_static_address_without_ra_server(self): with dummy_device() as dev: ipwrapper.addrAdd(dev, '2001::88', '64', family=6) ip_addrs = addresses.getIpAddrs()[dev] assert addresses.is_ipv6_local_auto(dev) assert 2 == len(ip_addrs), ip_addrs assert addresses.is_ipv6(ip_addrs[0]) assert not addresses.is_dynamic(ip_addrs[0])
def test_local_auto_with_static_address_without_ra_server(self, nic0): Interface.from_existing_dev_name(nic0).add_ip('2001::88', IPV6_PREFIX_LENGTH, IpFamily.IPv6) ip_addrs = addresses.getIpAddrs()[nic0] assert addresses.is_ipv6_local_auto(nic0) assert 2 == len(ip_addrs), ip_addrs assert addresses.is_ipv6(ip_addrs[0]) assert not addresses.is_dynamic(ip_addrs[0])