def test_my_example_hook(): ok_(hooks.has_key('my_example_hook')) hook_results = [] for res in run_hooks('my_example_hook'): hook_results.append(res) # return results are the weight of the hook and should be in numerical # order res = hook_results = [-100, 0, 99] ok_(res)
def test_my_example_hook(): ok_(hooks.has_key("my_example_hook")) hook_results = [] for res in run_hooks("my_example_hook"): hook_results.append(res) # return results are the weight of the hook and should be in numerical # order res = hook_results = [-100, 0, 99] ok_(res)
def check_hook(hook_name): assert hooks.has_key(hook_name)