def METHOD_NAME(self):
    c, k = self.c, self.c.k
    def callback(event=None, c=c):
        self.callback_was_called = True
    commandName = 'test-registerCommand'
    k.registerCommand(commandName, callback)
    k.simulateCommand(commandName)
    assert self.callback_was_called, commandName