Beispiel #1
0
    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)
Beispiel #2
0
    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)
Beispiel #3
0
 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)
Beispiel #4
0
 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)