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

@@ -454,6 +454,10 @@ class TestcaseParserUnittest(unittest.TestCase):
testcase.parse_function("func(1, 2, a=3, b=4)"),
{'func_name': 'func', 'args': [1, 2], 'kwargs': {'a': 3, 'b': 4}}
)
self.assertEqual(
testcase.parse_function("func($request, 123)"),
{'func_name': 'func', 'args': ["$request", 123], 'kwargs': {}}
)
def test_parse_content_with_bindings_variables(self):
variables = {