Adding server mode

This commit is contained in:
Steve Pulec 2013-03-05 08:14:43 -05:00
commit a728b2581a
31 changed files with 489 additions and 66 deletions

View file

@ -4,6 +4,9 @@ from moto.core.utils import headers_to_dict, camelcase_to_underscores, method_na
class BaseResponse(object):
def dispatch2(self, uri, body, headers):
return self.dispatch(uri, body, headers)
def dispatch(self, uri, body, headers):
if body:
querystring = parse_qs(body)
@ -13,7 +16,7 @@ class BaseResponse(object):
self.path = uri.path
self.querystring = querystring
action = querystring['Action'][0]
action = querystring.get('Action', [""])[0]
action = camelcase_to_underscores(action)
method_names = method_names_from_class(self.__class__)