Fix unit test error
Fix all the order of decorators and parameters in unittest. Change-Id: Ic055aaf38f1e99d21ca1ada3055048ee72a360d9
This commit is contained in:
parent
5cbb6dcbc9
commit
95c1a0e7e2
|
@ -50,7 +50,7 @@ class ABClientTest(base.TestCase):
|
|||
@mock.patch('oslo_config.cfg.ConfigOpts', FakeConfig)
|
||||
@mock.patch('karbor.utils.find_config')
|
||||
@mock.patch('os.path.abspath')
|
||||
def test_create_client_by_config_file(self, mock_findconfig, mock_abspath):
|
||||
def test_create_client_by_config_file(self, mock_abspath, mock_findconfig):
|
||||
mock_findconfig.return_value = '/etc/provider.d'
|
||||
mock_abspath.return_value = ''
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ class ProviderRegistryTest(base.TestCase):
|
|||
@mock.patch.object(provider.PluggableProtectionProvider, '_load_bank')
|
||||
@mock.patch.object(provider.PluggableProtectionProvider,
|
||||
'_register_plugin')
|
||||
def test_load_providers(self, mock_load_bank, mock_register_plugin):
|
||||
def test_load_providers(self, mock_register_plugin, mock_load_bank):
|
||||
pr = provider.ProviderRegistry()
|
||||
self.assertEqual(1, mock_register_plugin.call_count)
|
||||
self.assertEqual(1, mock_load_bank.call_count)
|
||||
|
|
Loading…
Reference in New Issue