Fix multiple bugs encountered with boto3

* Fix path detection for deleting keys in S3 bucket
* Fix stack deletion ensure delete method exists on object
  * Previous tests were using a stack with no resources
* Fix DESCRIBE_STACK_RESOURCES_RESPONSE,
  * Previously untested code path
This commit is contained in:
Declan Shanaghy 2016-03-31 13:33:13 -07:00
commit b152c00642
6 changed files with 81 additions and 30 deletions

View file

@ -16,7 +16,9 @@ def parse_key_name(path):
def is_delete_keys(request, path, bucket_name):
return path == u'/' + bucket_name + u'/?delete' or (
path == u'/' + bucket_name and
getattr(request, "query_string", "") == "delete"
return (
path == u'/' + bucket_name + u'/?delete' or
path == u'/' + bucket_name + u'?delete' or
(path == u'/' + bucket_name and
getattr(request, "query_string", "") == "delete")
)