Merge "More multi-char-delimiter func test coverage"
This commit is contained in:
commit
d3916312d3
@ -694,7 +694,7 @@ class TestContainer(Base):
|
|||||||
|
|
||||||
delimiter = '-&'
|
delimiter = '-&'
|
||||||
files = ['test', delimiter.join(['test', 'bar']),
|
files = ['test', delimiter.join(['test', 'bar']),
|
||||||
delimiter.join(['test', 'foo'])]
|
delimiter.join(['test', 'foo']), "test-'baz"]
|
||||||
for f in files:
|
for f in files:
|
||||||
file_item = cont.file(f)
|
file_item = cont.file(f)
|
||||||
self.assertTrue(file_item.write_random())
|
self.assertTrue(file_item.write_random())
|
||||||
@ -703,20 +703,21 @@ class TestContainer(Base):
|
|||||||
results = cont.files(parms={'format': format_type})
|
results = cont.files(parms={'format': format_type})
|
||||||
if isinstance(results[0], dict):
|
if isinstance(results[0], dict):
|
||||||
results = [x.get('name', x.get('subdir')) for x in results]
|
results = [x.get('name', x.get('subdir')) for x in results]
|
||||||
self.assertEqual(results, ['test', 'test-&bar', 'test-&foo'])
|
self.assertEqual(results, ['test', 'test-&bar', 'test-&foo',
|
||||||
|
"test-'baz"])
|
||||||
|
|
||||||
results = cont.files(parms={'delimiter': delimiter,
|
results = cont.files(parms={'delimiter': delimiter,
|
||||||
'format': format_type})
|
'format': format_type})
|
||||||
if isinstance(results[0], dict):
|
if isinstance(results[0], dict):
|
||||||
results = [x.get('name', x.get('subdir')) for x in results]
|
results = [x.get('name', x.get('subdir')) for x in results]
|
||||||
self.assertEqual(results, ['test', 'test-&'])
|
self.assertEqual(results, ['test', 'test-&', "test-'baz"])
|
||||||
|
|
||||||
results = cont.files(parms={'delimiter': delimiter,
|
results = cont.files(parms={'delimiter': delimiter,
|
||||||
'format': format_type,
|
'format': format_type,
|
||||||
'reverse': 'yes'})
|
'reverse': 'yes'})
|
||||||
if isinstance(results[0], dict):
|
if isinstance(results[0], dict):
|
||||||
results = [x.get('name', x.get('subdir')) for x in results]
|
results = [x.get('name', x.get('subdir')) for x in results]
|
||||||
self.assertEqual(results, ['test-&', 'test'])
|
self.assertEqual(results, ["test-'baz", 'test-&', 'test'])
|
||||||
|
|
||||||
def testListDelimiterAndPrefix(self):
|
def testListDelimiterAndPrefix(self):
|
||||||
cont = self.env.account.container(Utils.create_name())
|
cont = self.env.account.container(Utils.create_name())
|
||||||
|
Loading…
Reference in New Issue
Block a user