Check headers in response before Strings and JSON
This helps avoid a situation where: * no content-type header is returned * but json is expected by a response_json_paths * and no json_data is created because that will only happen if there is a correct content-type This will at least make sure that the initial error is the one reported, rather than something caused by that error. It also makes semantic sense, the order of testing is: * check the status * check the headers * check the body
This commit is contained in:
@@ -40,9 +40,9 @@ from gabbi import suite as gabbi_suite
|
||||
from gabbi import utils
|
||||
|
||||
RESPONSE_HANDLERS = [
|
||||
handlers.HeadersResponseHandler,
|
||||
handlers.StringResponseHandler,
|
||||
handlers.JSONResponseHandler,
|
||||
handlers.HeadersResponseHandler,
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user