group exceptions to 2 types: failure and error

This commit is contained in:
debugtalk
2018-07-25 10:40:20 +08:00
parent 7a2920fac2
commit 7478331cb5
12 changed files with 60 additions and 54 deletions

View File

@@ -138,7 +138,7 @@ class TestResponse(ApiServerUnittest):
]
resp_obj = response.ResponseObject(resp)
with self.assertRaises(exception.ParseResponseError):
with self.assertRaises(exception.ParseResponseFailure):
resp_obj.extract_response(extract_binds_list)
extract_binds_list = [
@@ -146,7 +146,7 @@ class TestResponse(ApiServerUnittest):
]
resp_obj = response.ResponseObject(resp)
with self.assertRaises(exception.ParseResponseError):
with self.assertRaises(exception.ParseResponseFailure):
resp_obj.extract_response(extract_binds_list)
def test_extract_response_json_string(self):
@@ -225,5 +225,5 @@ class TestResponse(ApiServerUnittest):
{"resp_content_body": "content.data.def"}
]
resp_obj = response.ResponseObject(resp)
with self.assertRaises(exception.ParseResponseError):
with self.assertRaises(exception.ParseResponseFailure):
resp_obj.extract_response(extract_binds_list)