diff options
| author | papaeye <papaeye@gmail.com> | 2013-05-22 04:30:19 +0900 |
|---|---|---|
| committer | papaeye <papaeye@gmail.com> | 2013-05-22 04:30:19 +0900 |
| commit | 2a34335dc3efacf545171bf81075c556aae49f5d (patch) | |
| tree | f208fb779d839a4b677573a5a15aa84c92801a89 /test_requests.py | |
| parent | 715a57dec888c850d16b767d7cdab9705fda7292 (diff) | |
| download | python-requests-2a34335dc3efacf545171bf81075c556aae49f5d.tar.gz | |
Fix #1374
Diffstat (limited to 'test_requests.py')
| -rwxr-xr-x[-rw-r--r--] | test_requests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test_requests.py b/test_requests.py index 09619fff..4a4831e5 100644..100755 --- 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) |
