extract_response when initialize ResponseObject

This commit is contained in:
debugtalk
2017-06-28 23:35:56 +08:00
parent 207998a2f5
commit 997e9d642b
3 changed files with 9 additions and 11 deletions

View File

@@ -3,11 +3,14 @@ from ate import utils, exception
class ResponseObject(object):
def __init__(self, resp_obj):
def __init__(self, resp_obj, context=None):
""" initialize with a requests.Response object
@param (requests.Response instance) resp_obj
@param (ate.context.Context instance) context
"""
self.resp_obj = resp_obj
if context:
self.extract_response(context)
def parsed_body(self):
try: