Пример #1
0
 def test_module_args(self):
     cli = ConsoleCLI([])
     cli.parse()
     res = cli.module_args('copy')
     self.assertTrue(cli.parser is not None)
     self.assertIn('src', res)
     self.assertIn('backup', res)
     self.assertIsInstance(res, list)
Пример #2
0
 def test_module_args(self):
     cli = ConsoleCLI([])
     cli.parse()
     res = cli.module_args('copy')
     self.assertTrue(cli.parser is not None)
     self.assertIn('src', res)
     self.assertIn('backup', res)
     self.assertIsInstance(res, list)
Пример #3
0
 def test_helpdefault(self, mock_display):
     cli = ConsoleCLI([])
     cli.parse()
     cli.modules = set(['copy'])
     cli.helpdefault('copy')
     self.assertTrue(cli.parser is not None)
     self.assertTrue(
         len(mock_display.call_args_list) > 0,
         "display.display should have been called but was not")
Пример #4
0
 def test_helpdefault(self, mock_display):
     cli = ConsoleCLI([])
     cli.parse()
     cli.modules = set(['copy'])
     cli.helpdefault('copy')
     self.assertTrue(cli.parser is not None)
     self.assertTrue(len(mock_display.call_args_list) > 0,
                     "display.display should have been called but was not")
Пример #5
0
 def test_parse(self):
     cli = ConsoleCLI([])
     cli.parse()
     self.assertTrue(cli.parser is not None)
Пример #6
0
 def test_parse(self):
     cli = ConsoleCLI([])
     cli.parse()
     self.assertTrue(cli.parser is not None)