summaryrefslogtreecommitdiffstats
path: root/tests/create_zones_test.py
diff options
context:
space:
mode:
authorwu.zhihui <wu.zhihui1@zte.com.cn>2016-11-09 09:38:08 +0800
committerwu.zhihui <wu.zhihui1@zte.com.cn>2016-11-09 09:38:08 +0800
commiteed3a9fc0bf490bef2e1c7cc597db6063c11bcac (patch)
treec4582b43b6e3c22b4ca6d9a1ce885a677a6190a9 /tests/create_zones_test.py
parent03b2fdd33a019c4eabc8da7ba49c851bf91ffc4e (diff)
Merge func to utils
Local test is ok. JIRA: QTIP-131 Change-Id: I7009337903c7ded90dda47a05d6c1c95aa96815d Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
Diffstat (limited to 'tests/create_zones_test.py')
-rw-r--r--tests/create_zones_test.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/create_zones_test.py b/tests/create_zones_test.py
index 39e71c17..0f57581d 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 func.create_zones import AvailabilityZone
+from utils.create_zones import AvailabilityZone
return_list = []
@@ -61,9 +61,9 @@ class TestClass:
['create:compute1:compute1',
'add_host:compute1:10.20.0.4']),
])
- @mock.patch('func.create_zones.client', autospec=True)
- @mock.patch('func.create_zones.v2', autospec=True)
- @mock.patch('func.create_zones.session')
+ @mock.patch('utils.create_zones.client', autospec=True)
+ @mock.patch('utils.create_zones.v2', autospec=True)
+ @mock.patch('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()
@@ -73,7 +73,7 @@ class TestClass:
'OS_TENANT_NAME': 'admin'})
k.start()
azone = AvailabilityZone()
- azone.create_agg(test_input)
+ azone.create_aggs(test_input)
k.stop()
resout, reserr = capfd.readouterr()
for x in expected:
@@ -88,9 +88,9 @@ class TestClass:
([],
[]),
])
- @mock.patch('func.create_zones.client', autospec=True)
- @mock.patch('func.create_zones.v2', autospec=True)
- @mock.patch('func.create_zones.session')
+ @mock.patch('utils.create_zones.client', autospec=True)
+ @mock.patch('utils.create_zones.v2', autospec=True)
+ @mock.patch('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