def _main_test_helper(self, argv, func_name=None, *exp_args, **exp_kwargs): self.useFixture(fixtures.MonkeyPatch('sys.argv', argv)) def setup(product_name, version='unknown'): pass self.useFixture(fixtures.MonkeyPatch( 'glance.openstack.common.log.setup', setup)) manage.main() func_name.assert_called_once_with(*exp_args, **exp_kwargs)
def _main_test_helper(self, argv, func_name=None, *exp_args, **exp_kwargs): self.useFixture(fixtures.MonkeyPatch('sys.argv', argv)) def setup(product_name, version='unknown'): pass self.useFixture( fixtures.MonkeyPatch('glance.openstack.common.log.setup', setup)) manage.main() func_name.assert_called_once_with(*exp_args, **exp_kwargs)
def _main_test_helper(self, argv, func_name=None, *exp_args, **exp_kwargs): self.useFixture(fixtures.MonkeyPatch('sys.argv', argv)) manage.main() func_name.assert_called_once_with(*exp_args, **exp_kwargs)