mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Added a test to expose issue #747
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user