Add test for multivalued form-encoded element as a list
@@ -868,6 +868,12 @@ class TestRequests:
assert r.status_code == 200
assert r.url == httpbin('get?test=foo&test=baz')
+ def test_form_encoded_post_query_multivalued_element(self, httpbin):
+ r = requests.Request(method='POST', url=httpbin('post'),
+ data=dict(test=['foo', 'baz']))
+ prep = r.prepare()
+ assert prep.body == 'test=foo&test=baz'
+
def test_different_encodings_dont_break_post(self, httpbin):
r = requests.post(httpbin('post'),
data={'stuff': json.dumps({'a': 123})},
