Skip to content
Myr

Add test for multivalued form-encoded element as a list (#4700)

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

authored by Antti Kaihola · committed by Antti Kaihola · parent 4d51e6d · Browse files · 1 file+6 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+6 added−0 removed

  • tests:+6 added−0 removed

1 file+6 added−0 removed

modified:tests/test_requests.py+6 added
866 unmodified lines
867 r = requests.get(httpbin('get'), params=dict(test=['foo', 'baz']))868 assert r.status_code == 200869 assert r.url == httpbin('get?test=foo&test=baz')870871 def test_form_encoded_post_query_multivalued_element(self, httpbin):872 r = requests.Request(method='POST', url=httpbin('post'),873 data=dict(test=['foo', 'baz']))874 prep = r.prepare()875 assert prep.body == 'test=foo&test=baz'876877 def test_different_encodings_dont_break_post(self, httpbin):878 r = requests.post(httpbin('post'),879 data={'stuff': json.dumps({'a': 123})},880 params={'blah': 'asdf1234'},
1596 unmodified lines