Skip to content

Commit 1ab06d0

Browse files
committed
add url encoding test
1 parent 85579e0 commit 1ab06d0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_proxies.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ def request_get(port, path, token, host='localhost'):
1616
return h.getresponse()
1717

1818

19+
def test_server_proxy_url_encoding():
20+
r = request_get(PORT, '/python-http/Hellö Wörld 🎉你好世界@±¥', TOKEN)
21+
assert r.code == 200
22+
s = r.read().decode('utf-8')
23+
assert s.startswith('GET /Hellö Wörld 🎉你好世界@±¥?token=')
24+
25+
1926
def test_server_proxy_non_absolute():
2027
r = request_get(PORT, '/python-http/abc', TOKEN)
2128
assert r.code == 200

0 commit comments

Comments
 (0)