diff options
author | Peter Moody <pmoody@google.com> | 2011-01-12 22:56:36 +0000 |
---|---|---|
committer | Peter Moody <pmoody@google.com> | 2011-01-12 22:56:36 +0000 |
commit | 46c3e3ef02627e5ab48952b348a765be5719f03c (patch) | |
tree | a46718805d46a78ff859ca7ad74896457b745300 /ipaddr_test.py | |
parent | bfa3f94bb35e7634e7b8125192f16727b9a7b6a2 (diff) | |
download | ipaddr-py-46c3e3ef02627e5ab48952b348a765be5719f03c.tar.gz |
+ fix for i71
add support for pulling the teredo client and server addresses out
of an ipv6 address.
git-svn-id: https://ipaddr-py.googlecode.com/svn/trunk@199 09200d28-7f98-11dd-ad27-0f66e57d2035
Diffstat (limited to 'ipaddr_test.py')
-rwxr-xr-x | ipaddr_test.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ipaddr_test.py b/ipaddr_test.py index f4e06fa..739c5f6 100755 --- a/ipaddr_test.py +++ b/ipaddr_test.py @@ -1017,5 +1017,13 @@ class IpaddrUnitTest(unittest.TestCase): self.assertFalse(ip._is_valid_ip('2001:658:22a:zzzz:200::1')) self.assertFalse(ip._is_valid_ip('2001:658:22a:cafe1:200::1')) + def testTeredo(self): + # stolen from wikipedia + server = ipaddr.IPv4Address('65.54.227.120') + client = ipaddr.IPv4Address('192.0.2.45') + teredo_addr = '2001:0000:4136:e378:8000:63bf:3fff:fdd2' + self.assertEqual((server, client), + ipaddr.IPAddress(teredo_addr).teredo()) + if __name__ == '__main__': unittest.main() |