utils class TestCliCommands(unittest.TestCase): def setUp(self): self.runner = testing.CliRunner() def tearDown(self): utils.clean_up() def test_config_v(self): command = 'config' flags = ['-v'] result = self.runner.invoke(cli.main, [*flags, command]) self.assertEqual(result.exit_code, 0) def test_config_verbose(self): command = 'config' flags = ['--verbose'] result = self.runner.invoke(cli.main, [*flags, command]) self.assertEqual(result.exit_code, 0) def test_update_v(self): command = 'update' flags = ['-v'] result = self.runner.invoke(cli.main, [*flags, command]) self.assertEqual(result.exit_code, 0) def test_update_verbose(self): command = 'update' flags = ['--verbose'] result = self.runner.invoke(cli.main, [*flags, command]) self.assertEqual(result.exit_code, 0) def test_search_v(self): command = 'search' flags = ['-v'] result = self.runner.invoke(cli.main, [*flags, command]) self.assertEqual(result.exit_code, 0) def test_search_verbose(self): command = 'search' flags = ['--verbose'] result = self.runner.invoke(cli.main, [*flags, command]) self.assertEqual(result.exit_code, 0) if __name__ == '__main__': unittest.main()