Merge branch 'master' into fix_some_type_issues
This commit is contained in:
commit
d15a940cbb
|
@ -230,7 +230,7 @@ _PATH_DECODE_MAP = _make_decode_map(_PATH_DELIMS)
|
|||
_QUERY_KEY_QUOTE_MAP = _make_quote_map(_QUERY_KEY_SAFE)
|
||||
_QUERY_KEY_DECODE_MAP = _make_decode_map(_QUERY_KEY_DELIMS)
|
||||
_QUERY_VALUE_QUOTE_MAP = _make_quote_map(_QUERY_VALUE_SAFE)
|
||||
_QUERY_VALUE_DECODE_MAP = _make_decode_map(_QUERY_VALUE_DELIMS)
|
||||
_QUERY_VALUE_DECODE_MAP = _make_decode_map(_QUERY_VALUE_DELIMS | set("+"))
|
||||
_FRAGMENT_QUOTE_MAP = _make_quote_map(_FRAGMENT_SAFE)
|
||||
_FRAGMENT_DECODE_MAP = _make_decode_map(_FRAGMENT_DELIMS)
|
||||
_UNRESERVED_QUOTE_MAP = _make_quote_map(_UNRESERVED_CHARS)
|
||||
|
|
|
@ -36,6 +36,34 @@ class TestURL(HyperlinkTestCase):
|
|||
assert durl.user == "user"
|
||||
assert durl.userinfo == ("user", "\0\0\0\0")
|
||||
|
||||
def test_roundtrip_iri_parameter_values(self):
|
||||
# type: () -> None
|
||||
"""
|
||||
.to_iri() should never modify the application-level data of a query
|
||||
parameter.
|
||||
"""
|
||||
for value in ["hello", "goodbye", "+", "/", ":", "?"]:
|
||||
self.assertEqual(
|
||||
DecodedURL(DecodedURL().set("test", value).to_iri()).get(
|
||||
"test"
|
||||
),
|
||||
[value],
|
||||
)
|
||||
|
||||
def test_roundtrip_uri_parameter_values(self):
|
||||
# type: () -> None
|
||||
"""
|
||||
.to_uri() should never modify the application-level data of a query
|
||||
parameter.
|
||||
"""
|
||||
for value in ["hello", "goodbye", "+", "/", ":", "?"]:
|
||||
self.assertEqual(
|
||||
DecodedURL(DecodedURL().set("test", value).to_uri()).get(
|
||||
"test"
|
||||
),
|
||||
[value],
|
||||
)
|
||||
|
||||
def test_passthroughs(self):
|
||||
# type: () -> None
|
||||
|
||||
|
|
Loading…
Reference in New Issue