binary data upload bug test

This commit is contained in:
Kenneth Reitz
2012-02-15 02:03:26 -05:00
parent ab4c03adc3
commit 0d8c08cd22
2 changed files with 12 additions and 2 deletions
+5 -2
View File
@@ -65,8 +65,6 @@ class RequestsTestSuite(TestSetup, unittest.TestCase):
requests.patch
requests.post
def test_invalid_url(self):
self.assertRaises(ValueError, get, 'hiwpefhipowhefopw')
@@ -801,6 +799,11 @@ class RequestsTestSuite(TestSetup, unittest.TestCase):
assert r.content is None
assert isinstance(r.error, requests.exceptions.Timeout)
def test_upload_binary_data(self):
r = requests.get(httpbin('post'), auth=('a', 'b'), data='\xff')
if __name__ == '__main__':
unittest.main()