Fix #1374
authorpapaeye <papaeye@gmail.com>
Tue, 21 May 2013 19:30:19 +0000 (04:30 +0900)
committerpapaeye <papaeye@gmail.com>
Tue, 21 May 2013 19:30:19 +0000 (04:30 +0900)
test_requests.py [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 09619ff..4a4831e
@@ -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)