Failing test for Issue #737.

This commit is contained in:
Cory Benfield
2012-07-27 09:26:04 +01:00
parent 767751599e
commit 02dcc40acd
+11
View File
@@ -962,5 +962,16 @@ class RequestsTestSuite(TestSetup, TestBaseMixin, unittest.TestCase):
r.content
r.text
def test_post_fields_with_multiple_values_and_files(self):
"""Test that it is possible to POST using the files argument and a
list for a value in the data argument."""
data = {'field': ['a', 'b']}
files = {'file': 'Garbled data'}
r = post(httpbin('post'), data=data, files=files)
t = json.loads(r.text)
self.assertEqual(t.get('form'), {'field': 'a, b'})
self.assertEqual(t.get('files'), files)
if __name__ == '__main__':
unittest.main()