refactor hook mechanism:

1, remove EventHook;
2, setup_hooks: could reference request dict;
3, teardown_hooks: could reference Response object.
This commit is contained in:
debugtalk
2018-05-10 13:40:47 +08:00
parent ce995a798f
commit dcc1e70181
11 changed files with 162 additions and 139 deletions

View File

@@ -231,7 +231,7 @@ class VariableBindsUnittest(ApiServerUnittest):
def test_exec_content_functions(self):
test_runner = runner.Runner()
content = "${teardown_hook_sleep_1_secs(1)}"
content = "${sleep_N_secs(1)}"
start_time = time.time()
test_runner.context.eval_content(content)
end_time = time.time()