

def test_find(self):
    '\n        Application.find() should return a command\n        '
    application = Application()
    application.add(FooCommand())
    self.assertTrue(isinstance(application.find('foo:bar'), FooCommand), msg='.find() returns a command if its name exists')
    self.assertTrue(isinstance(application.find('h'), HelpCommand), msg='.find() returns a command if its name exists')
    self.assertTrue(isinstance(application.find('f:bar'), FooCommand), msg='.find() returns a command if the abbreviation for the namespace exists')
    self.assertTrue(isinstance(self.find('f:b'), FooCommand), msg='.find() returns a command if the abbreviation for the namespace and the command name exist')
    self.assertTrue(isinstance(application.find('a'), FooCommand), msg='.find() returns a command if the abbreviation exists for an alias')

dataset/ETHPy150Open sdispater/cleo/tests/test_application.py ApplicationTest.test_find/VarMisuse@96/191 `application`->`self`