add hook feature:

1, setup_hook: call function before request
2, teardown_hook: call function after request
This commit is contained in:
debugtalk
2018-03-14 11:57:35 +08:00
parent c7a1a17b3c
commit 8c618d2325
8 changed files with 129 additions and 64 deletions

View File

@@ -65,7 +65,7 @@ class TestRunner(ApiServerUnittest):
{"check": "status_code", "expect": 205},
{"check": "content.token", "comparator": "len_eq", "expect": 19}
],
"teardown": ["${sleep(2)}"]
"teardown_hooks": ["teardown_hook_sleep_1_secs"]
}
with self.assertRaises(exception.ValidationError):