mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-18 16:07:37 +08:00
1.4.5:
1, refactor ResponseObject; 2, response can be modified in teardown_hooks.
This commit is contained in:
@@ -94,3 +94,8 @@ def setup_hook_httpntlmauth(request):
|
||||
auth_account = request.pop("httpntlmauth")
|
||||
request["auth"] = HttpNtlmAuth(
|
||||
auth_account["username"], auth_account["password"])
|
||||
|
||||
def alter_response(response):
|
||||
response.status_code = 500
|
||||
response.headers["Content-Type"] = "html/text"
|
||||
response.json["headers"]["Host"] = "127.0.0.1:8888"
|
||||
|
||||
Reference in New Issue
Block a user