mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Temporary fix for unicode literal breaking test.
This commit is contained in:
@@ -351,7 +351,14 @@ class RequestsTestSuite(TestSetup, TestBaseMixin, unittest.TestCase):
|
||||
post5 = post(url, files={'file': ('file.txt', 'more fdata')})
|
||||
self.assertEqual(post5.status_code, 200)
|
||||
|
||||
post6 = post(url, files={'fname.txt': '\xe9'})
|
||||
# Dirty hack to tide us over until 3.3.
|
||||
# TODO: Remove this hack when Python 3.3 is released.
|
||||
if (sys.version_info[0] == 2):
|
||||
fdata = '\xc3\xa9'.decode('utf-8')
|
||||
else:
|
||||
fdata = '\xe9'
|
||||
|
||||
post6 = post(url, files={'fname.txt': fdata})
|
||||
self.assertEqual(post6.status_code, 200)
|
||||
|
||||
post7 = post(url, files={'fname.txt': 'fdata to verify'})
|
||||
|
||||
Reference in New Issue
Block a user