Beispiel #1
0
 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')
Beispiel #2
0
 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')
Beispiel #3
0
 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')
Beispiel #4
0
 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')