forked from TrueCloudLab/s3-tests
add test for no bucket list delimiter
This commit is contained in:
parent
881c09f626
commit
e7f66f178e
1 changed files with 16 additions and 0 deletions
|
@ -158,6 +158,22 @@ def test_bucket_list_prefix_none():
|
||||||
bucket = _create_keys(keys=key_names)
|
bucket = _create_keys(keys=key_names)
|
||||||
|
|
||||||
li = bucket.list()
|
li = bucket.list()
|
||||||
|
eq(li.prefix, '')
|
||||||
|
|
||||||
|
keys = [x for x in li if isinstance(x, boto.s3.key.Key)]
|
||||||
|
prefixes = [x for x in li if not isinstance(x, boto.s3.key.Key)]
|
||||||
|
|
||||||
|
eq(prefixes, [])
|
||||||
|
|
||||||
|
names = [e.name for e in keys]
|
||||||
|
eq(names, key_names)
|
||||||
|
|
||||||
|
|
||||||
|
def test_bucket_list_prefix_none_is_delimiter():
|
||||||
|
key_names = ['b/a/c', 'b/a/g', 'b/a/r', 'g']
|
||||||
|
bucket = _create_keys(keys=key_names)
|
||||||
|
|
||||||
|
li = bucket.list(delimiter='/')
|
||||||
keys = [x for x in li if isinstance(x, boto.s3.key.Key)]
|
keys = [x for x in li if isinstance(x, boto.s3.key.Key)]
|
||||||
prefixes = [x for x in li if not isinstance(x, boto.s3.key.Key)]
|
prefixes = [x for x in li if not isinstance(x, boto.s3.key.Key)]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue