def assert_skip_forbidden(self, context, skip_opt, user, noun, verb, args): """Checks that a hook would NOT be allowed to be skipped in a command invocation""" try: # assertRaises doesn't work with classmethods. context.args = args GlobalCommandHookRegistry.get_required_hooks(context, skip_opt, noun, verb, user) self.fail("Should have thrown an error.") except context.CommandError: pass
def assert_skip_forbidden(self, context, skip_opt, user, noun, verb, args): """Checks that a hook would NOT be allowed to be skipped in a command invocation""" try: # assertRaises doesn't work with classmethods. context.args = args GlobalCommandHookRegistry.get_required_hooks( context, skip_opt, noun, verb, user) self.fail("Should have thrown an error.") except context.CommandError: pass
def assert_skip_allowed(self, context, skip_opt, user, noun, verb, args): """Checks that a hook would be allowed to be skipped in a command invocation""" GlobalCommandHookRegistry.get_required_hooks(context, skip_opt, noun, verb, user)