コード例 #1
0
ファイル: test_utils.py プロジェクト: samriang/pybsd
 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')
コード例 #2
0
ファイル: test_utils.py プロジェクト: rebost/pybsd
 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')
コード例 #3
0
ファイル: test_utils.py プロジェクト: samriang/pybsd
 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')
コード例 #4
0
ファイル: test_utils.py プロジェクト: rebost/pybsd
 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')