

def assert_command_fails(self, command):
    mock.patch('argparse.ArgumentParser._print_message').start()
    with mock.patch.object(sys, 'argv', command), mock.patch.object(cli, 'run_sanity_checks'):
        self.assertRaises(SystemExit, cli.main)

dataset/ETHPy150Open openstack/neutron/neutron/tests/unit/db/test_migration.py TestCli.assert_command_fails/original