def test_split_ipv6_w_prefixlen(self): interface = ipaddress.ip_interface('a1:b2:c3:d4::/110') self.assertListEqual(split_if(interface), [ 6, 110, '00a1', '00b2', '00c3', '00d4', '0000', '0000', '0000', '0000' ], 'incorrect output')
def test_split_ipv6_w_prefixlen(self): interface = ipaddress.ip_interface('a1:b2:c3:d4::/110') self.assertListEqual(split_if(interface), [6, 110, '00a1', '00b2', '00c3', '00d4', '0000', '0000', '0000', '0000'], 'incorrect output')
def test_split_ipv4_w_prefixlen(self): interface = ipaddress.ip_interface('1.2.3.4/24') self.assertListEqual(split_if(interface), [4, 24, '1', '2', '3', '4'], 'incorrect output')