Assignment to reserved built-in symbol "file"
In file: tests/test_swiftclient.py, test_unicode_ok() & test_chunk_warning() Fixes bug #1207736 Change-Id: I0a822802ec8910e9aec36ae5af775f8abb384d34
This commit is contained in:
@@ -539,12 +539,12 @@ class TestPutObject(MockHttpTest):
|
|||||||
|
|
||||||
def test_unicode_ok(self):
|
def test_unicode_ok(self):
|
||||||
conn = c.http_connection(u'http://www.test.com/')
|
conn = c.http_connection(u'http://www.test.com/')
|
||||||
file = StringIO.StringIO(u'\u5929\u7a7a\u4e2d\u7684\u4e4c\u4e91')
|
mock_file = StringIO.StringIO(u'\u5929\u7a7a\u4e2d\u7684\u4e4c\u4e91')
|
||||||
args = (u'\u5929\u7a7a\u4e2d\u7684\u4e4c\u4e91',
|
args = (u'\u5929\u7a7a\u4e2d\u7684\u4e4c\u4e91',
|
||||||
'\u5929\u7a7a\u4e2d\u7684\u4e4c\u4e91',
|
'\u5929\u7a7a\u4e2d\u7684\u4e4c\u4e91',
|
||||||
u'\u5929\u7a7a\u4e2d\u7684\u4e4c\u4e91',
|
u'\u5929\u7a7a\u4e2d\u7684\u4e4c\u4e91',
|
||||||
u'\u5929\u7a7a\u4e2d\u7684\u4e4c\u4e91',
|
u'\u5929\u7a7a\u4e2d\u7684\u4e4c\u4e91',
|
||||||
file)
|
mock_file)
|
||||||
headers = {'X-Header1': u'\u5929\u7a7a\u4e2d\u7684\u4e4c\u4e91',
|
headers = {'X-Header1': u'\u5929\u7a7a\u4e2d\u7684\u4e4c\u4e91',
|
||||||
'X-2': 1, 'X-3': {'a': 'b'}, 'a-b': '.x:yz mn:fg:lp'}
|
'X-2': 1, 'X-3': {'a': 'b'}, 'a-b': '.x:yz mn:fg:lp'}
|
||||||
|
|
||||||
@@ -559,8 +559,8 @@ class TestPutObject(MockHttpTest):
|
|||||||
|
|
||||||
def test_chunk_warning(self):
|
def test_chunk_warning(self):
|
||||||
conn = c.http_connection('http://www.test.com/')
|
conn = c.http_connection('http://www.test.com/')
|
||||||
file = StringIO.StringIO('asdf')
|
mock_file = StringIO.StringIO('asdf')
|
||||||
args = ('asdf', 'asdf', 'asdf', 'asdf', file)
|
args = ('asdf', 'asdf', 'asdf', 'asdf', mock_file)
|
||||||
resp = MockHttpResponse()
|
resp = MockHttpResponse()
|
||||||
conn[1].getresponse = resp.fake_response
|
conn[1].getresponse = resp.fake_response
|
||||||
conn[1].send = resp.fake_send
|
conn[1].send = resp.fake_send
|
||||||
|
Reference in New Issue
Block a user