mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-14 20:08:23 +08:00
refactor teardown_hooks set attribute: remove response attributes interlayer
This commit is contained in:
@@ -102,7 +102,10 @@ def alter_response(response):
|
||||
response.status_code = 500
|
||||
response.headers["Content-Type"] = "html/text"
|
||||
response.json["headers"]["Host"] = "127.0.0.1:8888"
|
||||
response.attributes["new_attribute"] = "new_attribute"
|
||||
response.new_attribute = "new_attribute_value"
|
||||
response.new_attribute_dict = {
|
||||
"key": 123
|
||||
}
|
||||
|
||||
def alter_response_error(response):
|
||||
# NameError
|
||||
|
||||
Reference in New Issue
Block a user