diff options
author | pmoody@google.com <pmoody@google.com@09200d28-7f98-11dd-ad27-0f66e57d2035> | 2011-01-12 22:56:45 +0000 |
---|---|---|
committer | pmoody@google.com <pmoody@google.com@09200d28-7f98-11dd-ad27-0f66e57d2035> | 2011-01-12 22:56:45 +0000 |
commit | 250baa3feaaca651955ddb53324e4ff9faaf278f (patch) | |
tree | 985c587bd6efc4a0ef470e4902cdfe289f94c551 /trunk/ipaddr_test.py | |
parent | 41a77f12c91d9348362e38f8fe00df235b85e907 (diff) | |
download | ipaddr-py-250baa3feaaca651955ddb53324e4ff9faaf278f.tar.gz |
+ add 6to4 to the ipv6 tunnel decoding.
git-svn-id: https://ipaddr-py.googlecode.com/svn@201 09200d28-7f98-11dd-ad27-0f66e57d2035
Diffstat (limited to 'trunk/ipaddr_test.py')
-rwxr-xr-x | trunk/ipaddr_test.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/trunk/ipaddr_test.py b/trunk/ipaddr_test.py index 739c5f6..657ac99 100755 --- a/trunk/ipaddr_test.py +++ b/trunk/ipaddr_test.py @@ -1024,6 +1024,16 @@ class IpaddrUnitTest(unittest.TestCase): teredo_addr = '2001:0000:4136:e378:8000:63bf:3fff:fdd2' self.assertEqual((server, client), ipaddr.IPAddress(teredo_addr).teredo()) + bad_addr = '2000::4136:e378:8000:63bf:3fff:fdd2' + self.assertFalse(ipaddr.IPAddress(bad_addr).teredo()) + + def testsixtofour(self): + sixtofouraddr = ipaddr.IPAddress('2002:ac1d:2d64::1') + bad_addr = ipaddr.IPAddress('2000:ac1d:2d64::1') + self.assertEqual(ipaddr.IPv4Address('172.29.45.100'), + sixtofouraddr.sixtofour()) + self.assertFalse(bad_addr.sixtofour()) + if __name__ == '__main__': unittest.main() |