mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-20 23:59:49 +08:00
add setup and teardown block, in these blocks, we can exec functions such as sleep
This commit is contained in:
@@ -138,7 +138,7 @@ class Context(object):
|
||||
)
|
||||
|
||||
def get_parsed_request(self):
|
||||
""" get parsed request, with each variable replaced by bind value.
|
||||
""" get parsed request, with bind variables and functions.
|
||||
"""
|
||||
parsed_request = self.testcase_parser.parse_content_with_bindings(
|
||||
self.testcase_request_config
|
||||
@@ -148,3 +148,8 @@ class Context(object):
|
||||
|
||||
def get_testcase_variables_mapping(self):
|
||||
return self.testcase_variables_mapping
|
||||
|
||||
def exec_content_functions(self, content):
|
||||
""" execute functions in content.
|
||||
"""
|
||||
self.testcase_parser.eval_content_functions(content)
|
||||
|
||||
Reference in New Issue
Block a user