Skip to content
Myr

Added test case testing URI normalisation.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Tests that percent-encoded unreserved characters get de-encoded.

authored by Matt Giuca · committed by Matt Giuca · parent 08bc119 · Browse files · 1 file+8 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−0 removed

  • other:+8 added−0 removed

1 file+8 added−0 removed

modified:test_requests.py+8 added
150 unmodified lines
151 url = httpbin('get/' + path_reserved)152 response = get(url)153 self.assertEqual(response.url, httpbin('get/' + path_reserved))154155 # Test that percent-encoded unreserved characters in a path get156 # normalised to their un-encoded forms.157 path_unreserved = 'ABCDwxyz1234-._~'158 path_unreserved_escaped = '%41%42%43%44%77%78%79%7A%31%32%33%34%2D%2E%5F%7E'159 url = httpbin('get/' + path_unreserved_escaped)160 response = get(url)161 self.assertEqual(response.url, httpbin('get/' + path_unreserved))162163164 def test_user_agent_transfers(self):165 """Issue XX"""166167 heads = {
613 unmodified lines