

def _main_test_helper(self, argv, func_name, exp_kwargs=[{
    
}]):
    with mock.patch.object(sys, 'argv', argv), mock.patch.object(cli, 'run_sanity_checks'), mock.patch.object(cli, 'validate_revisions'), mock.patch.object(cli, '_use_separate_migration_branches'):
        cli.main()

        def _append_version_path(args):
            args = copy.copy(args)
            if (('autogenerate' in args) and (not args['autogenerate'])):
                args['version_path'] = mock.ANY
            return args
        kwargs.do_alembic_cmd.assert_has_calls([mock.call(mock.ANY, func_name, **_append_version_path(kwargs)) for kwargs in exp_kwargs])

dataset/ETHPy150Open openstack/neutron/neutron/tests/unit/db/test_migration.py TestCli._main_test_helper/VarMisuse@129/176 `self`->`kwargs`