Beispiel #1
0
 def test_complete_command_parser(self):
     sot = complete.CompleteCommand(mock.Mock(), mock.Mock())
     parser = sot.get_parser('nothing')
     self.assertEqual("nothing", parser.prog)
     self.assertEqual("print bash completion command\n    ",
                      parser.description)
Beispiel #2
0
 def given_complete_command(self):
     cmd_mgr = commandmanager.CommandManager('cliff.tests')
     app = application.App('testing', '1', cmd_mgr, stdout=FakeStdout())
     sot = complete.CompleteCommand(app, mock.Mock())
     cmd_mgr.add_command('complete', complete.CompleteCommand)
     return sot, app, cmd_mgr
Beispiel #3
0
def test_complete_command_parser():
    sot = complete.CompleteCommand(mock.Mock(), mock.Mock())
    parser = sot.get_parser('nothing')
    assert "nothing" == parser.prog
    assert "print bash completion command\n    " == parser.description