diff options
author | zhifeng.jiang <jiang.zhifeng@zte.com.cn> | 2016-11-16 22:56:07 +0800 |
---|---|---|
committer | zhifeng.jiang <jiang.zhifeng@zte.com.cn> | 2016-11-16 22:56:07 +0800 |
commit | 862f1fe7fab4b94242663ab509c3dd91dc592c2c (patch) | |
tree | 70c9b0e4ca105d349714435681a978ce408160c4 /tests/create_zones_test.py | |
parent | 2b3df7dce52e965ba5992334ce7d3d1c229a9ce9 (diff) |
Bugfix: Correct the path in unit test.
Change-Id: I2e019230bc50222222c5df4c0d18640616fff074
Signed-off-by: zhifeng.jiang <jiang.zhifeng@zte.com.cn>
Diffstat (limited to 'tests/create_zones_test.py')
-rw-r--r-- | tests/create_zones_test.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/create_zones_test.py b/tests/create_zones_test.py index 0f57581d..8b1e97cc 100644 --- a/tests/create_zones_test.py +++ b/tests/create_zones_test.py @@ -2,7 +2,7 @@ import pytest import mock from mock import Mock, MagicMock import os -from utils.create_zones import AvailabilityZone +from qtip.utils.create_zones import AvailabilityZone return_list = [] @@ -57,13 +57,13 @@ class TestClass: 'add_host:compute1:10.20.0.4', 'create:compute2:compute2', 'add_host:compute2:10.20.0.5']), - (['compute1', 'compute1'], + (['compute1'], ['create:compute1:compute1', 'add_host:compute1:10.20.0.4']), ]) - @mock.patch('utils.create_zones.client', autospec=True) - @mock.patch('utils.create_zones.v2', autospec=True) - @mock.patch('utils.create_zones.session') + @mock.patch('qtip.utils.create_zones.client', autospec=True) + @mock.patch('qtip.utils.create_zones.v2', autospec=True) + @mock.patch('qtip.utils.create_zones.session') def test_create_zones_success(self, mock_keystone_session, mock_keystone_v2, mock_nova_client, test_input, expected, capfd): nova_obj = NovaMock() mock_nova_client.Client.return_value = nova_obj() @@ -88,9 +88,9 @@ class TestClass: ([], []), ]) - @mock.patch('utils.create_zones.client', autospec=True) - @mock.patch('utils.create_zones.v2', autospec=True) - @mock.patch('utils.create_zones.session') + @mock.patch('qtip.utils.create_zones.client', autospec=True) + @mock.patch('qtip.utils.create_zones.v2', autospec=True) + @mock.patch('qtip.utils.create_zones.session') def test_clean_all_aggregates(self, mock_keystone_session, mock_keystone_v2, mock_nova_client, test_input, expected, capfd): global return_list return_list = test_input |