refactor: extract field

This commit is contained in:
debugtalk
2018-07-25 19:13:56 +08:00
parent dee51b6682
commit 9aeb64c5a0
3 changed files with 23 additions and 28 deletions

View File

@@ -101,7 +101,7 @@ class TestResponse(ApiServerUnittest):
extract_binds_list = [
{"resp_cookies": "cookies.xx"}
]
with self.assertRaises(exceptions.ParamsError):
with self.assertRaises(exceptions.ExtractFailure):
resp_obj.extract_response(extract_binds_list)
def test_extract_response_elapsed(self):
@@ -162,7 +162,7 @@ class TestResponse(ApiServerUnittest):
extract_binds_list = [
{"resp_headers_xxx": "headers.xxx"}
]
with self.assertRaises(exceptions.ParamsError):
with self.assertRaises(exceptions.ExtractFailure):
resp_obj.extract_response(extract_binds_list)
def test_extract_response_body_json(self):
@@ -265,7 +265,7 @@ class TestResponse(ApiServerUnittest):
extract_binds_list = [
{"resp_content": "content.xxx"}
]
with self.assertRaises(exceptions.ParamsError):
with self.assertRaises(exceptions.ExtractFailure):
resp_obj.extract_response(extract_binds_list)
def test_extract_response_others(self):