start pep8 cleanup
This commit is contained in:
parent
024624045f
commit
bcbec29653
7 changed files with 9 additions and 56 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import md5
|
||||
|
||||
from moto.core import BaseBackend
|
||||
from .utils import get_random_message_id
|
||||
|
||||
|
|
|
|||
|
|
@ -1,29 +1,9 @@
|
|||
import re
|
||||
from urlparse import parse_qs
|
||||
|
||||
from jinja2 import Template
|
||||
|
||||
from moto.core.utils import headers_to_dict, camelcase_to_underscores, method_names_from_class
|
||||
from moto.core.responses import BaseResponse
|
||||
from .models import ses_backend
|
||||
|
||||
|
||||
class BaseResponse(object):
|
||||
def dispatch(self, uri, body, headers):
|
||||
querystring = parse_qs(body)
|
||||
|
||||
self.path = uri.path
|
||||
self.querystring = querystring
|
||||
|
||||
action = querystring['Action'][0]
|
||||
action = camelcase_to_underscores(action)
|
||||
|
||||
method_names = method_names_from_class(self.__class__)
|
||||
if action in method_names:
|
||||
method = getattr(self, action)
|
||||
return method()
|
||||
raise NotImplementedError("The {} action has not been implemented".format(action))
|
||||
|
||||
|
||||
class EmailResponse(BaseResponse):
|
||||
|
||||
def verify_email_identity(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue