

def test_set_run_custom_default_command(self):
    '\n        Application calls the default command.\n        '
    application = Application()
    application.set_auto_exit(False)
    command = FooCommand()
    application.add(command)
    application.set_default_command(command.get_name())
    tester = ApplicationTester(application)
    tester.run([])
    self.assertEqual('interact called\ncalled\n', tester.get_display())
    application = CustomDefaultCommandApplication()
    application.set_auto_exit(False)
    tester = ApplicationTester(application)
    tester.run([])
    self.assertEqual('interact called\ncalled\n', tester.get_display())

dataset/ETHPy150Open sdispater/cleo/tests/test_application.py ApplicationTest.test_set_run_custom_default_command/original