refactor: query json content

This commit is contained in:
httprunner
2018-07-25 17:32:12 +08:00
parent 007cfd9d1b
commit 85bb37194d
7 changed files with 32 additions and 22 deletions

View File

@@ -300,7 +300,7 @@ class TestResponse(ApiServerUnittest):
]
resp_obj = response.ResponseObject(resp)
with self.assertRaises(exceptions.ParseResponseFailure):
with self.assertRaises(exceptions.ExtractFailure):
resp_obj.extract_response(extract_binds_list)
extract_binds_list = [
@@ -308,7 +308,7 @@ class TestResponse(ApiServerUnittest):
]
resp_obj = response.ResponseObject(resp)
with self.assertRaises(exceptions.ParseResponseFailure):
with self.assertRaises(exceptions.ExtractFailure):
resp_obj.extract_response(extract_binds_list)
def test_extract_response_json_string(self):
@@ -387,5 +387,5 @@ class TestResponse(ApiServerUnittest):
{"resp_content_body": "content.data.def"}
]
resp_obj = response.ResponseObject(resp)
with self.assertRaises(exceptions.ParseResponseFailure):
with self.assertRaises(exceptions.ExtractFailure):
resp_obj.extract_response(extract_binds_list)