Tweak bucket.delete_keys for s3bucket_path.

This commit is contained in:
zeb 2015-09-04 18:48:48 +02:00
commit b59a77d5bb
3 changed files with 52 additions and 2 deletions

View file

@ -9,8 +9,14 @@ from moto.s3.responses import ResponseObject
def parse_key_name(pth):
return "/".join(pth.rstrip("/").split("/")[2:])
def is_delete_keys(path, bucket_name):
return path == u'/' + bucket_name + u'/?delete'
S3BucketPathResponseInstance = ResponseObject(
s3bucket_path_backend,
bucket_name_from_url,
parse_key_name,
is_delete_keys,
)