Permalink
Browse files

tests for IPV6 addresses with and without ports

  • Loading branch information...
glyphobet committed Jun 19, 2012
1 parent d8b3d8b commit dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a
Showing with 32 additions and 0 deletions.
  1. +16 −0 tests/test_iri.py
  2. +16 −0 tests/test_uri.py
View
@@ -104,6 +104,22 @@ class TestIRIPileOfPoo(cases.IdentifierCase):
class TestIRIIPv6(cases.IdentifierCase):
+ ri = IRI("http://u:p@[2a00:1450:4001:c01::67]/path?q=arg#frag")
+ expect = dict(
+ scheme="http",
+ auth="u:p",
+ hostname="2a00:1450:4001:c01::67",
+ port=None,
+ path="/path",
+ query=MultiDict([('q', 'arg')]),
+ querystr='q=arg',
+ fragment="frag",
+ netloc="u:p@[2a00:1450:4001:c01::67]",
+ )
+
+
+class TestIRIIPv6WithPort(cases.IdentifierCase):
+
ri = IRI("http://u:p@[2a00:1450:4001:c01::67]:80/path?q=arg#frag")
expect = dict(
scheme="http",
View
@@ -100,6 +100,22 @@ class TestURIPileOfPoo(cases.IdentifierCase):
class TestURIIPv6(cases.IdentifierCase):
+ ri = URI("http://u:p@[2a00:1450:4001:c01::67]/path?q=arg#frag")
+ expect = dict(
+ scheme="http",
+ auth="u:p",
+ hostname="2a00:1450:4001:c01::67",
+ port=None,
+ path="/path",
+ query=MultiDict([('q', 'arg')]),
+ querystr='q=arg',
+ fragment="frag",
+ netloc="u:p@[2a00:1450:4001:c01::67]",
+ )
+
+
+class TestURIIPv6WithPort(cases.IdentifierCase):
+
ri = URI("http://u:p@[2a00:1450:4001:c01::67]:80/path?q=arg#frag")
expect = dict(
scheme="http",

0 comments on commit dc5ef4b

Please sign in to comment.