diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2016-11-09 14:47:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-11-09 14:47:36 +0000 |
commit | 939299c36b3cf79f198d4a4849345eabd878973b (patch) | |
tree | c859592ecf932107c11a77f45e1d40c1a888ec63 /tests/create_zones_test.py | |
parent | 8f27035ce5d24eca2382c01acf645851bd9f8c82 (diff) | |
parent | eed3a9fc0bf490bef2e1c7cc597db6063c11bcac (diff) |
Merge "Merge func to utils"
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 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 |