def test_remote_hook(self): hooks.register_hook('bar', 'baz', 'zuz') hooks.remove_hook('bar', 'baz', 'zuz') self.assertDictEqual(hooks.get_hook_table('bar'), {'baz': []})
def test_hook_decorator(self): @hooks.hook('foo', 'bar') def test(): pass t = hooks.get_hook_table('foo') self.assertDictEqual(t, {'bar': [test]})
def test_register_hook(self): ''' ''' hooks.register_hook('bar', 'baz', 'zuz') self.assertDictEqual(hooks.get_hook_table('bar'), {'baz': ['zuz']})