Added a test to expose issue #747
authorMarcus McCurdy <marcus.mccurdy@gmail.com>
Sat, 4 Aug 2012 00:09:56 +0000 (20:09 -0400)
committerMarcus McCurdy <marcus.mccurdy@gmail.com>
Sat, 4 Aug 2012 00:09:56 +0000 (20:09 -0400)
tests/test_requests.py

index 60a840772180db93918871f0e445851645dc8544..10da6f7e1842413e6e9e1fdfd15376de48a41141 100755 (executable)
@@ -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()