Adding sqs queue creation
This commit is contained in:
parent
e261b82f29
commit
89364ed864
12 changed files with 244 additions and 35 deletions
|
|
@ -1,7 +1,8 @@
|
|||
from jinja2 import Template
|
||||
|
||||
from .models import s3_backend
|
||||
from .utils import bucket_name_from_hostname, headers_to_dict
|
||||
from moto.core.utils import headers_to_dict
|
||||
from .utils import bucket_name_from_hostname
|
||||
|
||||
|
||||
def all_buckets(uri, body, method):
|
||||
|
|
|
|||
|
|
@ -6,13 +6,3 @@ bucket_name_regex = re.compile("(.+).s3.amazonaws.com")
|
|||
def bucket_name_from_hostname(hostname):
|
||||
bucket_result = bucket_name_regex.search(hostname)
|
||||
return bucket_result.groups()[0]
|
||||
|
||||
|
||||
def headers_to_dict(headers):
|
||||
result = {}
|
||||
for header in headers.split("\r\n"):
|
||||
if ':' in header:
|
||||
key, value = header.split(":", 1)
|
||||
result[key.strip()] = value.strip()
|
||||
|
||||
return result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue