Example #1
0
    def test_ipv6_to_bin_with_shortcut(self):
        ipv6_str = '3f:10::1:2'
        val = struct.pack('!8H', 0x3f, 0x10, 0, 0, 0, 0, 0x1, 0x2)

        res = ip.ipv6_to_bin(ipv6_str)
        eq_(val, res)
Example #2
0
    def test_ipv6_to_bin_with_shortcut(self):
        ipv6_str = '3f:10::1:2'
        val = struct.pack('!8H', 0x3f, 0x10, 0, 0, 0, 0, 0x1, 0x2)

        res = ip.ipv6_to_bin(ipv6_str)
        eq_(val, res)
Example #3
0
 def test_ipv6_to_bin(self):
     ipv6_str = '2013:da8:215:8f2:aa20:66ff:fe4c:9c3c'
     val = struct.pack('!8H', 0x2013, 0xda8, 0x215, 0x8f2, 0xaa20, 0x66ff,
                       0xfe4c, 0x9c3c)
     res = ip.ipv6_to_bin(ipv6_str)
     eq_(val, res)
Example #4
0
 def test_ipv6_to_bin(self):
     ipv6_str = '2013:da8:215:8f2:aa20:66ff:fe4c:9c3c'
     val = struct.pack('!8H', 0x2013, 0xda8, 0x215, 0x8f2, 0xaa20, 0x66ff,
                       0xfe4c, 0x9c3c)
     res = ip.ipv6_to_bin(ipv6_str)
     eq_(val, res)