Beispiel #1
0
def test_builtin_plugins_hooks_start_condition():
    "make sure that all hooks are either empty, or contain callbacks marked with `slash.<identifier>`"
    for hook_name, hook in hooks.get_all_hooks():  # pylint: disable=unused-variable
        for registration in hook.get_registrations():
            assert registration.token.startswith(
                'slash.'), 'Callback {0} is not a builtin!'.format(
                    hook.full_name)
Beispiel #2
0
 def test_hooks_start_condition(self):
     "make sure that all hooks are either empty, or contain callbacks marked with `slash.<identifier>`"
     for hook_name, hook in hooks.get_all_hooks():
         for identifier, registered in hook.iter_registered():
             self.assertTrue(
                 identifier.startswith("slash."),
                 "Callback {0}.{1} is not a builtin!".format(
                     hook_name, identifier))
Beispiel #3
0
 def test_hooks_start_condition(self):
     "make sure that all hooks are either empty, or contain callbacks marked with `slash.<identifier>`"
     for hook_name, hook in hooks.get_all_hooks():
         for identifier, registered in hook.iter_registered():
             self.assertTrue(
                 identifier.startswith("slash."),
                 "Callback {0}.{1} is not a builtin!".format(hook_name, identifier)
             )
Beispiel #4
0
 def test_hooks_appear_in_get_all_hooks(self):
     all_hooks = dict(hooks.get_all_hooks())
     self.assertIs(all_hooks[self.hook_name], self.hook)
Beispiel #5
0
 def test_hooks_appear_in_get_all_hooks(self):
     all_hooks = dict(hooks.get_all_hooks())
     self.assertIs(all_hooks[self.hook_name], self.hook)
Beispiel #6
0
def test_builtin_plugins_hooks_start_condition():
    "make sure that all hooks are either empty, or contain callbacks marked with `slash.<identifier>`"
    for hook_name, hook in hooks.get_all_hooks():
        for registration in hook.get_registrations():
            assert registration.token.startswith('slash.'), 'Callback {0}.{1} is not a builtin!'.format(hook_name, identifier)