From 2a34335dc3efacf545171bf81075c556aae49f5d Mon Sep 17 00:00:00 2001 From: papaeye Date: Wed, 22 May 2013 04:30:19 +0900 Subject: [PATCH] Fix #1374 --- test_requests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 test_requests.py diff --git a/test_requests.py b/test_requests.py old mode 100644 new mode 100755 index 09619ff..4a4831e --- a/test_requests.py +++ b/test_requests.py @@ -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) -- 2.34.1