move to httpretty fork instead of bundling it.

This commit is contained in:
Steve Pulec 2013-03-17 18:13:21 -04:00
commit cd518d060e
7 changed files with 36 additions and 33 deletions

View file

@ -1,7 +1,7 @@
import functools
import re
from moto.packages.httpretty import HTTPretty
from httpretty import HTTPretty
from .responses import metadata_response
from .utils import convert_regex_to_flask_path

View file

@ -7,10 +7,10 @@ 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 dispatch2(self, uri, method, body, headers):
return self.dispatch(uri, method, body, headers)
def dispatch(self, uri, body, headers):
def dispatch(self, uri, method, body, headers):
if body:
querystring = parse_qs(body)
else:
@ -29,7 +29,7 @@ class BaseResponse(object):
raise NotImplementedError("The {} action has not been implemented".format(action))
def metadata_response(uri, body, headers):
def metadata_response(uri, method, body, headers):
"""
Mock response for localhost metadata

View file

@ -102,7 +102,7 @@ class convert_flask_to_httpretty_response(object):
body = request.data or query
headers = dict(request.headers)
result = self.callback(uri, body, headers)
result = self.callback(uri, method, body, headers)
if isinstance(result, basestring):
# result is just the response
return result