Fix unit test error

Fix all the order of decorators and parameters in unittest.

Change-Id: Ic055aaf38f1e99d21ca1ada3055048ee72a360d9
This commit is contained in:
shenxindi 2019-11-15 10:49:54 +08:00
parent 5cbb6dcbc9
commit 95c1a0e7e2
2 changed files with 2 additions and 2 deletions

View File

@ -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 = ''

View File

@ -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)