Test out py26 with new HTTPretty

This commit is contained in:
Steve Pulec 2013-10-03 20:34:13 -04:00
commit 3bddbb4af3
23 changed files with 81 additions and 68 deletions

View file

@ -42,7 +42,7 @@ class EmailResponse(BaseResponse):
destination = self.querystring.get('Destination.ToAddresses.member.1')[0]
message = ses_backend.send_email(source, subject, body, destination)
if not message:
return "Did not have authority to send from email {}".format(source), dict(status=400)
return "Did not have authority to send from email {0}".format(source), dict(status=400)
template = Template(SEND_EMAIL_RESPONSE)
return template.render(message=message)
@ -53,7 +53,7 @@ class EmailResponse(BaseResponse):
message = ses_backend.send_raw_email(source, destination, raw_data)
if not message:
return "Did not have authority to send from email {}".format(source), dict(status=400)
return "Did not have authority to send from email {0}".format(source), dict(status=400)
template = Template(SEND_RAW_EMAIL_RESPONSE)
return template.render(message=message)

View file

@ -7,7 +7,7 @@ def random_hex(length):
def get_random_message_id():
return "{}-{}-{}-{}-{}-{}-{}".format(
return "{0}-{1}-{2}-{3}-{4}-{5}-{6}".format(
random_hex(16),
random_hex(8),
random_hex(4),