mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Fix #1374
This commit is contained in:
Regular → Executable
+2
-1
@@ -345,11 +345,12 @@ class RequestsTestCase(unittest.TestCase):
|
||||
self.assertEqual(r.status_code, 200)
|
||||
|
||||
def test_unicode_multipart_post_fieldnames(self):
|
||||
filename = os.path.splitext(__file__)[0] + '.py'
|
||||
r = requests.Request(method='POST',
|
||||
url=httpbin('post'),
|
||||
data={'stuff'.encode('utf-8'): 'elixr'},
|
||||
files={'file': ('test_requests.py',
|
||||
open(__file__, 'rb'))})
|
||||
open(filename, 'rb'))})
|
||||
prep = r.prepare()
|
||||
self.assertTrue(b'name="stuff"' in prep.body)
|
||||
self.assertFalse(b'name="b\'stuff\'"' in prep.body)
|
||||
|
||||
Reference in New Issue
Block a user