

def test_add(self):
    '\n        Application.add() and .addCommands() register commands\n        '
    application = Application()
    foo = FooCommand()
    application.add(foo)
    self.assertEqual(foo, application.all()['foo:bar'], msg='.add() registers a command')
    application = Application()
    (foo, foo1) = (FooCommand(), Foo1Command())
    application.add_commands([foo, foo1])
    commands = foo1.all()
    self.assertEqual([foo, foo1], [commands['foo:bar'], commands['foo:bar1']], msg='.add_commands() registers a list of commands')

dataset/ETHPy150Open sdispater/cleo/tests/test_application.py ApplicationTest.test_add/VarMisuse@86/131 `application`->`foo1`