def MakeResponse(code=500, data=''):
 response = requests.Response()
 response.status_code = code
 response._content = data
 return response

def MakeResponse ( code = 500 , data = '' ) : response = requests . Response ( ) response . status_code = code response . _content = data return response
a helper for creating a httperror exception .