def test_validate_handler_function_args_controller_valid(self): def x(): pass InterfaceEventDispatcher._validate_handler_function_args(x, True)
def test_validate_handler_function_args_controller_too_many(self): def x(a): pass with self.assertRaises(InvalidEventHandler): InterfaceEventDispatcher._validate_handler_function_args(x, True)
def test_validate_handler_function_args_not_controller_too_few(self): def x(): pass with self.assertRaises(InvalidEventHandler): InterfaceEventDispatcher._validate_handler_function_args(x, False)