def assertExitWithFailure(self, argv): with mock.patch('sys.argv', argv): with self.assertRaises(SystemExit) as e: cli = CLI() cli.start() self.assertNotEqual(e.exception.code, 0)
def assertExitWithFailure(self, argv): with mock.patch("sys.argv", argv): with self.assertRaises(SystemExit) as e: cli = CLI() cli.start() self.assertNotEqual(e.exception.code, 0)
def init_cli(): cli = CLI() cli.start()