Tests: Changed tests to accept variables in "location".
This commit is contained in:
@@ -83,7 +83,7 @@ Connection: close
|
|||||||
assert resp['body'] == ''
|
assert resp['body'] == ''
|
||||||
|
|
||||||
def test_return_location(self):
|
def test_return_location(self):
|
||||||
reserved = ":/?#[]@!$&'()*+,;="
|
reserved = ":/?#[]@!&'()*+,;="
|
||||||
unreserved = (
|
unreserved = (
|
||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
|
||||||
"0123456789-._~"
|
"0123456789-._~"
|
||||||
@@ -107,15 +107,15 @@ Connection: close
|
|||||||
check_location(reserved)
|
check_location(reserved)
|
||||||
|
|
||||||
# After first "?" all other "?" encoded.
|
# After first "?" all other "?" encoded.
|
||||||
check_location("/?" + reserved, "/?:/%3F#[]@!$&'()*+,;=")
|
check_location("/?" + reserved, "/?:/%3F#[]@!&'()*+,;=")
|
||||||
check_location("???", "?%3F%3F")
|
check_location("???", "?%3F%3F")
|
||||||
|
|
||||||
# After first "#" all other "?" or "#" encoded.
|
# After first "#" all other "?" or "#" encoded.
|
||||||
check_location("/#" + reserved, "/#:/%3F%23[]@!$&'()*+,;=")
|
check_location("/#" + reserved, "/#:/%3F%23[]@!&'()*+,;=")
|
||||||
check_location("##?#?", "#%23%3F%23%3F")
|
check_location("##?#?", "#%23%3F%23%3F")
|
||||||
|
|
||||||
# After first "?" next "#" not encoded.
|
# After first "?" next "#" not encoded.
|
||||||
check_location("/?#" + reserved, "/?#:/%3F%23[]@!$&'()*+,;=")
|
check_location("/?#" + reserved, "/?#:/%3F%23[]@!&'()*+,;=")
|
||||||
check_location("??##", "?%3F#%23")
|
check_location("??##", "?%3F#%23")
|
||||||
check_location("/?##?", "/?#%23%3F")
|
check_location("/?##?", "/?#%23%3F")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user