Exemple #1
0
 def test_isc_inet_ip6_addr2_passing(self):
     """INET clause; ip6_addr element; passing mode"""
     test_data = [
         '::',
         '::8',
         '::2:3:4:5:6:7:8',
         '1::',
         '1::8',
         '1::7:8',
         '1::6:7:8',
         '1::5:6:7:8',
         '1::4:5:6:7:8',
         '1::3:4:5:6:7:8',
         '1:2::8',
         '1:2::4:5:6:7:8',
         '1:2:3::8',
         '1:2:3::5:6:7:8',
         '1:2:3:4::8',
         '1:2:3:4::6:7:8',
         '1:2:3:4:5::8',
         '1:2:3:4:5::7:8',
         '1:2:3:4:5:6::8',
         '1:2:3:4:5:6::8',
         '2001:db8:3:4::192.0.2.33',
         'ff9b::192.0.2.33',  # (IPv4 - Embedded IPv6 Address)
         '::ffff:255.255.255.255',  # (IPv4-mapped IPv6 addresses and IPv4-translated addresses)
         '::255.255.255.255',  # (IPv4-mapped IPv6 addresses and IPv4-translated addresses)
         '2001:db8::2:192.0.2.33',  # (unknown 2-1 combo)
         '2001::13f:9:192.8.1.16',  # (unknown 1-2 combo)
         '2001::13f:192.8.1.16',  #  (unknown 1-1 combo)
         '2001::192.8.1.16',  # (unknown 1-0 combo)'
     ]
     result = ip6_addr.runTests(test_data, failureTests=False)
     self.assertTrue(result[0])
Exemple #2
0
    def test_isc_inet_ip6_addr_passing(self):
        """INET clause, ip6_addr passing
         1::                              1:2:3:4:5:6:7::
         1::8             1:2:3:4:5:6::8  1:2:3:4:5:6::8
         1::7:8           1:2:3:4:5::7:8  1:2:3:4:5::8
         1::6:7:8         1:2:3:4::6:7:8  1:2:3:4::8
         1::5:6:7:8       1:2:3::5:6:7:8  1:2:3::8
         1::4:5:6:7:8     1:2::4:5:6:7:8  1:2::8
         1::3:4:5:6:7:8   1::3:4:5:6:7:8  1::8
         ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8 ::8       ::
         ::ffff:0:255.255.255.255 (IPv4-mapped IPv6 addresses and IPv4-translated addresses)
         ::ffff:255.255.255.255 (IPv4-mapped IPv6 addresses and IPv4-translated addresses)
         2001:db8:3:4::192.0.2.33  64:ff9b::192.0.2.33 (IPv4-Embedded IPv6 Address)
         ::255.255.255.255 (IPv4-mapped IPv6 addresses and IPv4-translated addresses)

        """
        test_data = [
            'fe01::1', '1::1', '1::', '1:2:3:4:5:6:7::', '1::8',
            '1:2:3:4:5:6::8', '1::7:8', '1:2:3:4:5::7:8', '1:2:3:4:5::8',
            '1::6:7:8', '1:2:3:4::6:7:8', '1:2:3:4::8', '1::5:6:7:8',
            '1:2:3::5:6:7:8', '1:2:3::8', '1::4:5:6:7:8', '1:2::4:5:6:7:8',
            '1:2::8', '1::3:4:5:6:7:8', '1::8', 'fe80::7:8', '::2:3:4:5:6:7:8',
            '::8', '::ffff:0:255.255.255.255', '::ffff:255.255.255.255',
            '2001:db8:3:4::192.0.2.33', '64:ff9b::192.0.2.33',
            '::255.255.255.255', '2001::', '2001:240::', '2001:610:240::',
            '2001:f810:610:240::'
        ]
        result = ip6_addr.runTests(test_data, failureTests=False)
        self.assertTrue(result[0])
Exemple #3
0
 def test_isc_inet_ip6_addr_failing(self):
     """INET clause, ip6_addr failing"""
     test_data = [
         'geee::1',
         'iii::1',
     ]
     result = ip6_addr.runTests(test_data, failureTests=True)
     self.assertTrue(result[0])
Exemple #4
0
 def test_isc_inet_ip6_addr_failing(self):
     """INET clause, ip6_addr failing"""
     test_data = [
         'geee::1',
         'iii::1',
     ]
     result = ip6_addr.runTests(test_data, failureTests=True)
     self.assertTrue(result[0])
     """INET object, ip6_addr_list_series passing
     Full IPv6 (without the trailing '/') with trailing semicolon
     """
     test_data = [
         '::1;',
         '1:2::8; 2:3::7; ',  # two IP6 in a series
         '1:2::8; 2:3::7; ::1;',  # three IP6 in a series
         '1:2::8; 2:3::7; 3:4::6; ::1;',
     ]
     result = ip6_addr_list_series.runTests(test_data, failureTests=False)
     print("result: ", result)
     self.assertTrue(result[0])