Adding sqs queue creation

This commit is contained in:
Steve Pulec 2013-02-23 22:26:46 -05:00
commit 89364ed864
12 changed files with 244 additions and 35 deletions

View file

@ -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):

View file

@ -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