Added a test to expose issue #747

This commit is contained in:
Marcus McCurdy
2012-08-03 20:09:56 -04:00
parent b5ca4b4430
commit 12328d6e58
+7
View File
@@ -973,5 +973,12 @@ class RequestsTestSuite(TestSetup, TestBaseMixin, unittest.TestCase):
self.assertEqual(t.get('form'), {'field': 'a, b'})
self.assertEqual(t.get('files'), files)
def test_str_data_content_type(self):
data = "test string data"
r = post(httpbin('post'), data=data)
t = json.loads(r.text)
self.assertEqual(t.get('headers').get('Content-Type'), 'text/plain')
if __name__ == '__main__':
unittest.main()