From e5a13047918402ab0373181e25bb842d33c4ad50 Mon Sep 17 00:00:00 2001 From: John Griffith Date: Fri, 6 Mar 2015 09:55:26 -0700 Subject: [PATCH] Move unit tests into test directory This is the first step of moving functional testing into the project tree. This change just moves all of the unit tests to be under a dedicated tests/unit directory. Follow up patches will add the functional directory and start moving tempest CLI tests there. Change-Id: I9dc0b8f761676c1b3bbdeb03e2f44b35f75c693e --- cinderclient/tests/{fixture_data => unit}/__init__.py | 0 cinderclient/tests/{ => unit}/fakes.py | 0 cinderclient/tests/{v1 => unit/fixture_data}/__init__.py | 0 .../tests/{ => unit}/fixture_data/availability_zones.py | 2 +- cinderclient/tests/{ => unit}/fixture_data/base.py | 0 cinderclient/tests/{ => unit}/fixture_data/client.py | 2 +- .../tests/{ => unit}/fixture_data/keystone_client.py | 0 cinderclient/tests/{ => unit}/fixture_data/snapshots.py | 2 +- cinderclient/tests/{ => unit}/test_auth_plugins.py | 2 +- cinderclient/tests/{ => unit}/test_base.py | 4 ++-- cinderclient/tests/{ => unit}/test_client.py | 2 +- cinderclient/tests/{ => unit}/test_http.py | 2 +- cinderclient/tests/{ => unit}/test_service_catalog.py | 2 +- cinderclient/tests/{ => unit}/test_shell.py | 4 ++-- cinderclient/tests/{ => unit}/test_utils.py | 2 +- cinderclient/tests/{ => unit}/utils.py | 0 cinderclient/tests/{v1/contrib => unit/v1}/__init__.py | 0 cinderclient/tests/{v2 => unit/v1/contrib}/__init__.py | 0 .../tests/{ => unit}/v1/contrib/test_list_extensions.py | 4 ++-- cinderclient/tests/{ => unit}/v1/fakes.py | 4 ++-- cinderclient/tests/{ => unit}/v1/test_auth.py | 2 +- cinderclient/tests/{ => unit}/v1/test_availability_zone.py | 6 +++--- cinderclient/tests/{ => unit}/v1/test_limits.py | 2 +- cinderclient/tests/{ => unit}/v1/test_qos.py | 4 ++-- cinderclient/tests/{ => unit}/v1/test_quota_classes.py | 4 ++-- cinderclient/tests/{ => unit}/v1/test_quotas.py | 4 ++-- cinderclient/tests/{ => unit}/v1/test_services.py | 4 ++-- cinderclient/tests/{ => unit}/v1/test_shell.py | 6 +++--- cinderclient/tests/{ => unit}/v1/test_snapshot_actions.py | 6 +++--- cinderclient/tests/{ => unit}/v1/test_types.py | 4 ++-- cinderclient/tests/{ => unit}/v1/test_volume_backups.py | 4 ++-- .../tests/{ => unit}/v1/test_volume_encryption_types.py | 4 ++-- cinderclient/tests/{v2 => unit/v1}/test_volume_transfers.py | 4 ++-- cinderclient/tests/{ => unit}/v1/test_volumes.py | 4 ++-- cinderclient/tests/{ => unit}/v1/testfile.txt | 0 cinderclient/tests/{v2/contrib => unit/v2}/__init__.py | 0 cinderclient/tests/unit/v2/contrib/__init__.py | 0 .../tests/{ => unit}/v2/contrib/test_list_extensions.py | 4 ++-- cinderclient/tests/{ => unit}/v2/fakes.py | 4 ++-- cinderclient/tests/{ => unit}/v2/test_auth.py | 2 +- cinderclient/tests/{ => unit}/v2/test_availability_zone.py | 6 +++--- cinderclient/tests/{ => unit}/v2/test_cgsnapshots.py | 4 ++-- cinderclient/tests/{ => unit}/v2/test_consistencygroups.py | 4 ++-- cinderclient/tests/{ => unit}/v2/test_limits.py | 2 +- cinderclient/tests/{ => unit}/v2/test_pools.py | 4 ++-- cinderclient/tests/{ => unit}/v2/test_qos.py | 4 ++-- cinderclient/tests/{ => unit}/v2/test_quota_classes.py | 4 ++-- cinderclient/tests/{ => unit}/v2/test_quotas.py | 4 ++-- cinderclient/tests/{ => unit}/v2/test_services.py | 4 ++-- cinderclient/tests/{ => unit}/v2/test_shell.py | 6 +++--- cinderclient/tests/{ => unit}/v2/test_snapshot_actions.py | 6 +++--- cinderclient/tests/{ => unit}/v2/test_type_access.py | 4 ++-- cinderclient/tests/{ => unit}/v2/test_types.py | 4 ++-- cinderclient/tests/{ => unit}/v2/test_volume_backups.py | 4 ++-- .../tests/{ => unit}/v2/test_volume_encryption_types.py | 4 ++-- cinderclient/tests/{v1 => unit/v2}/test_volume_transfers.py | 4 ++-- cinderclient/tests/{ => unit}/v2/test_volumes.py | 4 ++-- 57 files changed, 86 insertions(+), 86 deletions(-) rename cinderclient/tests/{fixture_data => unit}/__init__.py (100%) rename cinderclient/tests/{ => unit}/fakes.py (100%) rename cinderclient/tests/{v1 => unit/fixture_data}/__init__.py (100%) rename cinderclient/tests/{ => unit}/fixture_data/availability_zones.py (98%) rename cinderclient/tests/{ => unit}/fixture_data/base.py (100%) rename cinderclient/tests/{ => unit}/fixture_data/client.py (97%) rename cinderclient/tests/{ => unit}/fixture_data/keystone_client.py (100%) rename cinderclient/tests/{ => unit}/fixture_data/snapshots.py (97%) rename cinderclient/tests/{ => unit}/test_auth_plugins.py (99%) rename cinderclient/tests/{ => unit}/test_base.py (96%) rename cinderclient/tests/{ => unit}/test_client.py (98%) rename cinderclient/tests/{ => unit}/test_http.py (99%) rename cinderclient/tests/{ => unit}/test_service_catalog.py (99%) rename cinderclient/tests/{ => unit}/test_shell.py (98%) rename cinderclient/tests/{ => unit}/test_utils.py (98%) rename cinderclient/tests/{ => unit}/utils.py (100%) rename cinderclient/tests/{v1/contrib => unit/v1}/__init__.py (100%) rename cinderclient/tests/{v2 => unit/v1/contrib}/__init__.py (100%) rename cinderclient/tests/{ => unit}/v1/contrib/test_list_extensions.py (92%) rename cinderclient/tests/{ => unit}/v1/fakes.py (99%) rename cinderclient/tests/{ => unit}/v1/test_auth.py (99%) rename cinderclient/tests/{ => unit}/v1/test_availability_zone.py (94%) rename cinderclient/tests/{ => unit}/v1/test_limits.py (99%) rename cinderclient/tests/{ => unit}/v1/test_qos.py (97%) rename cinderclient/tests/{ => unit}/v1/test_quota_classes.py (96%) rename cinderclient/tests/{ => unit}/v1/test_quotas.py (95%) rename cinderclient/tests/{ => unit}/v1/test_services.py (97%) rename cinderclient/tests/{ => unit}/v1/test_shell.py (99%) rename cinderclient/tests/{ => unit}/v1/test_snapshot_actions.py (89%) rename cinderclient/tests/{ => unit}/v1/test_types.py (94%) rename cinderclient/tests/{ => unit}/v1/test_volume_backups.py (95%) rename cinderclient/tests/{ => unit}/v1/test_volume_encryption_types.py (97%) rename cinderclient/tests/{v2 => unit/v1}/test_volume_transfers.py (95%) rename cinderclient/tests/{ => unit}/v1/test_volumes.py (97%) rename cinderclient/tests/{ => unit}/v1/testfile.txt (100%) rename cinderclient/tests/{v2/contrib => unit/v2}/__init__.py (100%) create mode 100644 cinderclient/tests/unit/v2/contrib/__init__.py rename cinderclient/tests/{ => unit}/v2/contrib/test_list_extensions.py (93%) rename cinderclient/tests/{ => unit}/v2/fakes.py (99%) rename cinderclient/tests/{ => unit}/v2/test_auth.py (99%) rename cinderclient/tests/{ => unit}/v2/test_availability_zone.py (94%) rename cinderclient/tests/{ => unit}/v2/test_cgsnapshots.py (97%) rename cinderclient/tests/{ => unit}/v2/test_consistencygroups.py (97%) rename cinderclient/tests/{ => unit}/v2/test_limits.py (99%) rename cinderclient/tests/{ => unit}/v2/test_pools.py (95%) rename cinderclient/tests/{ => unit}/v2/test_qos.py (97%) rename cinderclient/tests/{ => unit}/v2/test_quota_classes.py (96%) rename cinderclient/tests/{ => unit}/v2/test_quotas.py (97%) rename cinderclient/tests/{ => unit}/v2/test_services.py (97%) rename cinderclient/tests/{ => unit}/v2/test_shell.py (99%) rename cinderclient/tests/{ => unit}/v2/test_snapshot_actions.py (89%) rename cinderclient/tests/{ => unit}/v2/test_type_access.py (94%) rename cinderclient/tests/{ => unit}/v2/test_types.py (97%) rename cinderclient/tests/{ => unit}/v2/test_volume_backups.py (96%) rename cinderclient/tests/{ => unit}/v2/test_volume_encryption_types.py (97%) rename cinderclient/tests/{v1 => unit/v2}/test_volume_transfers.py (95%) rename cinderclient/tests/{ => unit}/v2/test_volumes.py (99%) diff --git a/cinderclient/tests/fixture_data/__init__.py b/cinderclient/tests/unit/__init__.py similarity index 100% rename from cinderclient/tests/fixture_data/__init__.py rename to cinderclient/tests/unit/__init__.py diff --git a/cinderclient/tests/fakes.py b/cinderclient/tests/unit/fakes.py similarity index 100% rename from cinderclient/tests/fakes.py rename to cinderclient/tests/unit/fakes.py diff --git a/cinderclient/tests/v1/__init__.py b/cinderclient/tests/unit/fixture_data/__init__.py similarity index 100% rename from cinderclient/tests/v1/__init__.py rename to cinderclient/tests/unit/fixture_data/__init__.py diff --git a/cinderclient/tests/fixture_data/availability_zones.py b/cinderclient/tests/unit/fixture_data/availability_zones.py similarity index 98% rename from cinderclient/tests/fixture_data/availability_zones.py rename to cinderclient/tests/unit/fixture_data/availability_zones.py index bb1bc68f1..124e897c3 100644 --- a/cinderclient/tests/fixture_data/availability_zones.py +++ b/cinderclient/tests/unit/fixture_data/availability_zones.py @@ -11,7 +11,7 @@ # under the License. from datetime import datetime -from cinderclient.tests.fixture_data import base +from cinderclient.tests.unit.fixture_data import base # FIXME(jamielennox): use timeutils from oslo FORMAT = '%Y-%m-%d %H:%M:%S' diff --git a/cinderclient/tests/fixture_data/base.py b/cinderclient/tests/unit/fixture_data/base.py similarity index 100% rename from cinderclient/tests/fixture_data/base.py rename to cinderclient/tests/unit/fixture_data/base.py diff --git a/cinderclient/tests/fixture_data/client.py b/cinderclient/tests/unit/fixture_data/client.py similarity index 97% rename from cinderclient/tests/fixture_data/client.py rename to cinderclient/tests/unit/fixture_data/client.py index 47bbb6458..310ca4fce 100644 --- a/cinderclient/tests/fixture_data/client.py +++ b/cinderclient/tests/unit/fixture_data/client.py @@ -12,7 +12,7 @@ from keystoneclient import fixture -from cinderclient.tests.fixture_data import base +from cinderclient.tests.unit.fixture_data import base from cinderclient.v1 import client as v1client from cinderclient.v2 import client as v2client diff --git a/cinderclient/tests/fixture_data/keystone_client.py b/cinderclient/tests/unit/fixture_data/keystone_client.py similarity index 100% rename from cinderclient/tests/fixture_data/keystone_client.py rename to cinderclient/tests/unit/fixture_data/keystone_client.py diff --git a/cinderclient/tests/fixture_data/snapshots.py b/cinderclient/tests/unit/fixture_data/snapshots.py similarity index 97% rename from cinderclient/tests/fixture_data/snapshots.py rename to cinderclient/tests/unit/fixture_data/snapshots.py index c37963923..ec4d3b392 100644 --- a/cinderclient/tests/fixture_data/snapshots.py +++ b/cinderclient/tests/unit/fixture_data/snapshots.py @@ -12,7 +12,7 @@ import json -from cinderclient.tests.fixture_data import base +from cinderclient.tests.unit.fixture_data import base def _stub_snapshot(**kwargs): diff --git a/cinderclient/tests/test_auth_plugins.py b/cinderclient/tests/unit/test_auth_plugins.py similarity index 99% rename from cinderclient/tests/test_auth_plugins.py rename to cinderclient/tests/unit/test_auth_plugins.py index 9a951148e..91adfa9e2 100644 --- a/cinderclient/tests/test_auth_plugins.py +++ b/cinderclient/tests/unit/test_auth_plugins.py @@ -25,7 +25,7 @@ except ImportError: from cinderclient import auth_plugin from cinderclient import exceptions -from cinderclient.tests import utils +from cinderclient.tests.unit import utils from cinderclient.v1 import client diff --git a/cinderclient/tests/test_base.py b/cinderclient/tests/unit/test_base.py similarity index 96% rename from cinderclient/tests/test_base.py rename to cinderclient/tests/unit/test_base.py index 665940cde..e4eba0dcd 100644 --- a/cinderclient/tests/test_base.py +++ b/cinderclient/tests/unit/test_base.py @@ -14,8 +14,8 @@ from cinderclient import base from cinderclient import exceptions from cinderclient.v1 import volumes -from cinderclient.tests import utils -from cinderclient.tests.v1 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v1 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/test_client.py b/cinderclient/tests/unit/test_client.py similarity index 98% rename from cinderclient/tests/test_client.py rename to cinderclient/tests/unit/test_client.py index f8fce259f..89722f0ce 100644 --- a/cinderclient/tests/test_client.py +++ b/cinderclient/tests/unit/test_client.py @@ -18,7 +18,7 @@ import fixtures import cinderclient.client import cinderclient.v1.client import cinderclient.v2.client -from cinderclient.tests import utils +from cinderclient.tests.unit import utils class ClientTest(utils.TestCase): diff --git a/cinderclient/tests/test_http.py b/cinderclient/tests/unit/test_http.py similarity index 99% rename from cinderclient/tests/test_http.py rename to cinderclient/tests/unit/test_http.py index 3246663b3..f9997bc49 100644 --- a/cinderclient/tests/test_http.py +++ b/cinderclient/tests/unit/test_http.py @@ -17,7 +17,7 @@ import requests from cinderclient import client from cinderclient import exceptions -from cinderclient.tests import utils +from cinderclient.tests.unit import utils fake_response = utils.TestResponse({ diff --git a/cinderclient/tests/test_service_catalog.py b/cinderclient/tests/unit/test_service_catalog.py similarity index 99% rename from cinderclient/tests/test_service_catalog.py rename to cinderclient/tests/unit/test_service_catalog.py index 214b9e7f7..f7f35b953 100644 --- a/cinderclient/tests/test_service_catalog.py +++ b/cinderclient/tests/unit/test_service_catalog.py @@ -13,7 +13,7 @@ from cinderclient import exceptions from cinderclient import service_catalog -from cinderclient.tests import utils +from cinderclient.tests.unit import utils # Taken directly from keystone/content/common/samples/auth.json diff --git a/cinderclient/tests/test_shell.py b/cinderclient/tests/unit/test_shell.py similarity index 98% rename from cinderclient/tests/test_shell.py rename to cinderclient/tests/unit/test_shell.py index 63fa1c665..98ee55a77 100644 --- a/cinderclient/tests/test_shell.py +++ b/cinderclient/tests/unit/test_shell.py @@ -23,8 +23,8 @@ from testtools import matchers from cinderclient import exceptions from cinderclient import shell -from cinderclient.tests import utils -from cinderclient.tests.fixture_data import keystone_client +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.fixture_data import keystone_client import keystoneclient.exceptions as ks_exc from keystoneclient.exceptions import DiscoveryFailure diff --git a/cinderclient/tests/test_utils.py b/cinderclient/tests/unit/test_utils.py similarity index 98% rename from cinderclient/tests/test_utils.py rename to cinderclient/tests/unit/test_utils.py index cf2518f64..43b0c2e69 100644 --- a/cinderclient/tests/test_utils.py +++ b/cinderclient/tests/unit/test_utils.py @@ -19,7 +19,7 @@ from six import moves from cinderclient import exceptions from cinderclient import utils from cinderclient import base -from cinderclient.tests import utils as test_utils +from cinderclient.tests.unit import utils as test_utils UUID = '8e8ec658-c7b0-4243-bdf8-6f7f2952c0d0' diff --git a/cinderclient/tests/utils.py b/cinderclient/tests/unit/utils.py similarity index 100% rename from cinderclient/tests/utils.py rename to cinderclient/tests/unit/utils.py diff --git a/cinderclient/tests/v1/contrib/__init__.py b/cinderclient/tests/unit/v1/__init__.py similarity index 100% rename from cinderclient/tests/v1/contrib/__init__.py rename to cinderclient/tests/unit/v1/__init__.py diff --git a/cinderclient/tests/v2/__init__.py b/cinderclient/tests/unit/v1/contrib/__init__.py similarity index 100% rename from cinderclient/tests/v2/__init__.py rename to cinderclient/tests/unit/v1/contrib/__init__.py diff --git a/cinderclient/tests/v1/contrib/test_list_extensions.py b/cinderclient/tests/unit/v1/contrib/test_list_extensions.py similarity index 92% rename from cinderclient/tests/v1/contrib/test_list_extensions.py rename to cinderclient/tests/unit/v1/contrib/test_list_extensions.py index 96f5e35ff..989cc902c 100644 --- a/cinderclient/tests/v1/contrib/test_list_extensions.py +++ b/cinderclient/tests/unit/v1/contrib/test_list_extensions.py @@ -14,8 +14,8 @@ from cinderclient import extension from cinderclient.v1.contrib import list_extensions -from cinderclient.tests import utils -from cinderclient.tests.v1 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v1 import fakes extensions = [ diff --git a/cinderclient/tests/v1/fakes.py b/cinderclient/tests/unit/v1/fakes.py similarity index 99% rename from cinderclient/tests/v1/fakes.py rename to cinderclient/tests/unit/v1/fakes.py index 34d5e72fc..a5cb0f5d4 100644 --- a/cinderclient/tests/v1/fakes.py +++ b/cinderclient/tests/unit/v1/fakes.py @@ -21,8 +21,8 @@ except ImportError: import urllib.parse as urlparse from cinderclient import client as base_client -from cinderclient.tests import fakes -import cinderclient.tests.utils as utils +from cinderclient.tests.unit import fakes +import cinderclient.tests.unit.utils as utils from cinderclient.v1 import client diff --git a/cinderclient/tests/v1/test_auth.py b/cinderclient/tests/unit/v1/test_auth.py similarity index 99% rename from cinderclient/tests/v1/test_auth.py rename to cinderclient/tests/unit/v1/test_auth.py index 47da0e217..5864b969e 100644 --- a/cinderclient/tests/v1/test_auth.py +++ b/cinderclient/tests/unit/v1/test_auth.py @@ -18,7 +18,7 @@ import requests from cinderclient.v1 import client from cinderclient import exceptions -from cinderclient.tests import utils +from cinderclient.tests.unit import utils class AuthenticateAgainstKeystoneTests(utils.TestCase): diff --git a/cinderclient/tests/v1/test_availability_zone.py b/cinderclient/tests/unit/v1/test_availability_zone.py similarity index 94% rename from cinderclient/tests/v1/test_availability_zone.py rename to cinderclient/tests/unit/v1/test_availability_zone.py index e3e7d1f01..667b89f2f 100644 --- a/cinderclient/tests/v1/test_availability_zone.py +++ b/cinderclient/tests/unit/v1/test_availability_zone.py @@ -18,9 +18,9 @@ import six from cinderclient.v1 import availability_zones from cinderclient.v1 import shell -from cinderclient.tests.fixture_data import client -from cinderclient.tests.fixture_data import availability_zones as azfixture -from cinderclient.tests import utils +from cinderclient.tests.unit.fixture_data import client +from cinderclient.tests.unit.fixture_data import availability_zones as azfixture # noqa +from cinderclient.tests.unit import utils class AvailabilityZoneTest(utils.FixturedTestCase): diff --git a/cinderclient/tests/v1/test_limits.py b/cinderclient/tests/unit/v1/test_limits.py similarity index 99% rename from cinderclient/tests/v1/test_limits.py rename to cinderclient/tests/unit/v1/test_limits.py index cfcf78bd2..72808dff9 100644 --- a/cinderclient/tests/v1/test_limits.py +++ b/cinderclient/tests/unit/v1/test_limits.py @@ -15,7 +15,7 @@ import mock -from cinderclient.tests import utils +from cinderclient.tests.unit import utils from cinderclient.v1 import limits diff --git a/cinderclient/tests/v1/test_qos.py b/cinderclient/tests/unit/v1/test_qos.py similarity index 97% rename from cinderclient/tests/v1/test_qos.py rename to cinderclient/tests/unit/v1/test_qos.py index e127a4716..cfecbe8d0 100644 --- a/cinderclient/tests/v1/test_qos.py +++ b/cinderclient/tests/unit/v1/test_qos.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v1 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v1 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v1/test_quota_classes.py b/cinderclient/tests/unit/v1/test_quota_classes.py similarity index 96% rename from cinderclient/tests/v1/test_quota_classes.py rename to cinderclient/tests/unit/v1/test_quota_classes.py index e0d5db928..8ed91b7c3 100644 --- a/cinderclient/tests/v1/test_quota_classes.py +++ b/cinderclient/tests/unit/v1/test_quota_classes.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v1 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v1 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v1/test_quotas.py b/cinderclient/tests/unit/v1/test_quotas.py similarity index 95% rename from cinderclient/tests/v1/test_quotas.py rename to cinderclient/tests/unit/v1/test_quotas.py index b18046ff2..aebff63f0 100644 --- a/cinderclient/tests/v1/test_quotas.py +++ b/cinderclient/tests/unit/v1/test_quotas.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v1 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v1 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v1/test_services.py b/cinderclient/tests/unit/v1/test_services.py similarity index 97% rename from cinderclient/tests/v1/test_services.py rename to cinderclient/tests/unit/v1/test_services.py index 8f444cdb2..e0bfa7779 100644 --- a/cinderclient/tests/v1/test_services.py +++ b/cinderclient/tests/unit/v1/test_services.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v1 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v1 import fakes from cinderclient.v1 import services diff --git a/cinderclient/tests/v1/test_shell.py b/cinderclient/tests/unit/v1/test_shell.py similarity index 99% rename from cinderclient/tests/v1/test_shell.py rename to cinderclient/tests/unit/v1/test_shell.py index 9103f9f03..fc87d5b59 100644 --- a/cinderclient/tests/v1/test_shell.py +++ b/cinderclient/tests/unit/v1/test_shell.py @@ -22,9 +22,9 @@ from cinderclient import client from cinderclient import exceptions from cinderclient import shell from cinderclient.v1 import shell as shell_v1 -from cinderclient.tests.v1 import fakes -from cinderclient.tests import utils -from cinderclient.tests.fixture_data import keystone_client +from cinderclient.tests.unit.v1 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.fixture_data import keystone_client class ShellTest(utils.TestCase): diff --git a/cinderclient/tests/v1/test_snapshot_actions.py b/cinderclient/tests/unit/v1/test_snapshot_actions.py similarity index 89% rename from cinderclient/tests/v1/test_snapshot_actions.py rename to cinderclient/tests/unit/v1/test_snapshot_actions.py index c9bb81e5b..46d31b2a4 100644 --- a/cinderclient/tests/v1/test_snapshot_actions.py +++ b/cinderclient/tests/unit/v1/test_snapshot_actions.py @@ -13,9 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.fixture_data import client -from cinderclient.tests.fixture_data import snapshots +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.fixture_data import client +from cinderclient.tests.unit.fixture_data import snapshots class SnapshotActionsTest(utils.FixturedTestCase): diff --git a/cinderclient/tests/v1/test_types.py b/cinderclient/tests/unit/v1/test_types.py similarity index 94% rename from cinderclient/tests/v1/test_types.py rename to cinderclient/tests/unit/v1/test_types.py index 90ba77541..824140015 100644 --- a/cinderclient/tests/v1/test_types.py +++ b/cinderclient/tests/unit/v1/test_types.py @@ -12,8 +12,8 @@ # limitations under the License. from cinderclient.v1 import volume_types -from cinderclient.tests import utils -from cinderclient.tests.v1 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v1 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v1/test_volume_backups.py b/cinderclient/tests/unit/v1/test_volume_backups.py similarity index 95% rename from cinderclient/tests/v1/test_volume_backups.py rename to cinderclient/tests/unit/v1/test_volume_backups.py index dd7ec0dab..94020fa39 100644 --- a/cinderclient/tests/v1/test_volume_backups.py +++ b/cinderclient/tests/unit/v1/test_volume_backups.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v1 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v1 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v1/test_volume_encryption_types.py b/cinderclient/tests/unit/v1/test_volume_encryption_types.py similarity index 97% rename from cinderclient/tests/v1/test_volume_encryption_types.py rename to cinderclient/tests/unit/v1/test_volume_encryption_types.py index f8951d247..04093aeb9 100644 --- a/cinderclient/tests/v1/test_volume_encryption_types.py +++ b/cinderclient/tests/unit/v1/test_volume_encryption_types.py @@ -14,8 +14,8 @@ # under the License. from cinderclient.v1.volume_encryption_types import VolumeEncryptionType -from cinderclient.tests import utils -from cinderclient.tests.v1 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v1 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v2/test_volume_transfers.py b/cinderclient/tests/unit/v1/test_volume_transfers.py similarity index 95% rename from cinderclient/tests/v2/test_volume_transfers.py rename to cinderclient/tests/unit/v1/test_volume_transfers.py index 47656d794..4b27cb3f1 100644 --- a/cinderclient/tests/v2/test_volume_transfers.py +++ b/cinderclient/tests/unit/v1/test_volume_transfers.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v1 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v1 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v1/test_volumes.py b/cinderclient/tests/unit/v1/test_volumes.py similarity index 97% rename from cinderclient/tests/v1/test_volumes.py rename to cinderclient/tests/unit/v1/test_volumes.py index 1b59f7f03..75c81bd5f 100644 --- a/cinderclient/tests/v1/test_volumes.py +++ b/cinderclient/tests/unit/v1/test_volumes.py @@ -11,8 +11,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from cinderclient.tests import utils -from cinderclient.tests.v1 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v1 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v1/testfile.txt b/cinderclient/tests/unit/v1/testfile.txt similarity index 100% rename from cinderclient/tests/v1/testfile.txt rename to cinderclient/tests/unit/v1/testfile.txt diff --git a/cinderclient/tests/v2/contrib/__init__.py b/cinderclient/tests/unit/v2/__init__.py similarity index 100% rename from cinderclient/tests/v2/contrib/__init__.py rename to cinderclient/tests/unit/v2/__init__.py diff --git a/cinderclient/tests/unit/v2/contrib/__init__.py b/cinderclient/tests/unit/v2/contrib/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/cinderclient/tests/v2/contrib/test_list_extensions.py b/cinderclient/tests/unit/v2/contrib/test_list_extensions.py similarity index 93% rename from cinderclient/tests/v2/contrib/test_list_extensions.py rename to cinderclient/tests/unit/v2/contrib/test_list_extensions.py index 66126be26..3e22b7ada 100644 --- a/cinderclient/tests/v2/contrib/test_list_extensions.py +++ b/cinderclient/tests/unit/v2/contrib/test_list_extensions.py @@ -16,8 +16,8 @@ from cinderclient import extension from cinderclient.v2.contrib import list_extensions -from cinderclient.tests import utils -from cinderclient.tests.v1 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v1 import fakes extensions = [ diff --git a/cinderclient/tests/v2/fakes.py b/cinderclient/tests/unit/v2/fakes.py similarity index 99% rename from cinderclient/tests/v2/fakes.py rename to cinderclient/tests/unit/v2/fakes.py index aed7ab334..e0a3cfef3 100644 --- a/cinderclient/tests/v2/fakes.py +++ b/cinderclient/tests/unit/v2/fakes.py @@ -20,8 +20,8 @@ except ImportError: import urllib.parse as urlparse from cinderclient import client as base_client -from cinderclient.tests import fakes -import cinderclient.tests.utils as utils +from cinderclient.tests.unit import fakes +import cinderclient.tests.unit.utils as utils from cinderclient.v2 import client diff --git a/cinderclient/tests/v2/test_auth.py b/cinderclient/tests/unit/v2/test_auth.py similarity index 99% rename from cinderclient/tests/v2/test_auth.py rename to cinderclient/tests/unit/v2/test_auth.py index cb6dcadf2..9e9784696 100644 --- a/cinderclient/tests/v2/test_auth.py +++ b/cinderclient/tests/unit/v2/test_auth.py @@ -21,7 +21,7 @@ import requests from cinderclient import exceptions from cinderclient.v2 import client -from cinderclient.tests import utils +from cinderclient.tests.unit import utils class AuthenticateAgainstKeystoneTests(utils.TestCase): diff --git a/cinderclient/tests/v2/test_availability_zone.py b/cinderclient/tests/unit/v2/test_availability_zone.py similarity index 94% rename from cinderclient/tests/v2/test_availability_zone.py rename to cinderclient/tests/unit/v2/test_availability_zone.py index 599e884f5..cc6da9bb8 100644 --- a/cinderclient/tests/v2/test_availability_zone.py +++ b/cinderclient/tests/unit/v2/test_availability_zone.py @@ -18,9 +18,9 @@ import six from cinderclient.v2 import availability_zones from cinderclient.v2 import shell -from cinderclient.tests.fixture_data import client -from cinderclient.tests.fixture_data import availability_zones as azfixture -from cinderclient.tests import utils +from cinderclient.tests.unit.fixture_data import client +from cinderclient.tests.unit.fixture_data import availability_zones as azfixture # noqa +from cinderclient.tests.unit import utils class AvailabilityZoneTest(utils.FixturedTestCase): diff --git a/cinderclient/tests/v2/test_cgsnapshots.py b/cinderclient/tests/unit/v2/test_cgsnapshots.py similarity index 97% rename from cinderclient/tests/v2/test_cgsnapshots.py rename to cinderclient/tests/unit/v2/test_cgsnapshots.py index 984344088..e4d480612 100644 --- a/cinderclient/tests/v2/test_cgsnapshots.py +++ b/cinderclient/tests/unit/v2/test_cgsnapshots.py @@ -14,8 +14,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v2 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v2 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v2/test_consistencygroups.py b/cinderclient/tests/unit/v2/test_consistencygroups.py similarity index 97% rename from cinderclient/tests/v2/test_consistencygroups.py rename to cinderclient/tests/unit/v2/test_consistencygroups.py index 74136b9c2..e16973f48 100644 --- a/cinderclient/tests/v2/test_consistencygroups.py +++ b/cinderclient/tests/unit/v2/test_consistencygroups.py @@ -14,8 +14,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v2 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v2 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v2/test_limits.py b/cinderclient/tests/unit/v2/test_limits.py similarity index 99% rename from cinderclient/tests/v2/test_limits.py rename to cinderclient/tests/unit/v2/test_limits.py index 126f2bf9a..e296541a5 100644 --- a/cinderclient/tests/v2/test_limits.py +++ b/cinderclient/tests/unit/v2/test_limits.py @@ -15,7 +15,7 @@ import mock -from cinderclient.tests import utils +from cinderclient.tests.unit import utils from cinderclient.v2 import limits diff --git a/cinderclient/tests/v2/test_pools.py b/cinderclient/tests/unit/v2/test_pools.py similarity index 95% rename from cinderclient/tests/v2/test_pools.py rename to cinderclient/tests/unit/v2/test_pools.py index 79e417d60..921d58f82 100644 --- a/cinderclient/tests/v2/test_pools.py +++ b/cinderclient/tests/unit/v2/test_pools.py @@ -14,8 +14,8 @@ # under the License. from cinderclient.v2.pools import Pool -from cinderclient.tests import utils -from cinderclient.tests.v2 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v2 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v2/test_qos.py b/cinderclient/tests/unit/v2/test_qos.py similarity index 97% rename from cinderclient/tests/v2/test_qos.py rename to cinderclient/tests/unit/v2/test_qos.py index 3f3e6cf2c..bd303f5cc 100644 --- a/cinderclient/tests/v2/test_qos.py +++ b/cinderclient/tests/unit/v2/test_qos.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v2 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v2 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v2/test_quota_classes.py b/cinderclient/tests/unit/v2/test_quota_classes.py similarity index 96% rename from cinderclient/tests/v2/test_quota_classes.py rename to cinderclient/tests/unit/v2/test_quota_classes.py index a7aac29fa..96ca309af 100644 --- a/cinderclient/tests/v2/test_quota_classes.py +++ b/cinderclient/tests/unit/v2/test_quota_classes.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v2 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v2 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v2/test_quotas.py b/cinderclient/tests/unit/v2/test_quotas.py similarity index 97% rename from cinderclient/tests/v2/test_quotas.py rename to cinderclient/tests/unit/v2/test_quotas.py index 91ec2df0d..cc70f00de 100644 --- a/cinderclient/tests/v2/test_quotas.py +++ b/cinderclient/tests/unit/v2/test_quotas.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v2 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v2 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v2/test_services.py b/cinderclient/tests/unit/v2/test_services.py similarity index 97% rename from cinderclient/tests/v2/test_services.py rename to cinderclient/tests/unit/v2/test_services.py index ddce61c8f..12da4c38a 100644 --- a/cinderclient/tests/v2/test_services.py +++ b/cinderclient/tests/unit/v2/test_services.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v2 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v2 import fakes from cinderclient.v2 import services diff --git a/cinderclient/tests/v2/test_shell.py b/cinderclient/tests/unit/v2/test_shell.py similarity index 99% rename from cinderclient/tests/v2/test_shell.py rename to cinderclient/tests/unit/v2/test_shell.py index 36e399db6..10a8f5339 100644 --- a/cinderclient/tests/v2/test_shell.py +++ b/cinderclient/tests/unit/v2/test_shell.py @@ -21,9 +21,9 @@ from six.moves.urllib import parse from cinderclient import client from cinderclient import exceptions from cinderclient import shell -from cinderclient.tests import utils -from cinderclient.tests.v2 import fakes -from cinderclient.tests.fixture_data import keystone_client +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v2 import fakes +from cinderclient.tests.unit.fixture_data import keystone_client class ShellTest(utils.TestCase): diff --git a/cinderclient/tests/v2/test_snapshot_actions.py b/cinderclient/tests/unit/v2/test_snapshot_actions.py similarity index 89% rename from cinderclient/tests/v2/test_snapshot_actions.py rename to cinderclient/tests/unit/v2/test_snapshot_actions.py index f220541e0..87cc9c8d1 100644 --- a/cinderclient/tests/v2/test_snapshot_actions.py +++ b/cinderclient/tests/unit/v2/test_snapshot_actions.py @@ -13,9 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.fixture_data import client -from cinderclient.tests.fixture_data import snapshots +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.fixture_data import client +from cinderclient.tests.unit.fixture_data import snapshots class SnapshotActionsTest(utils.FixturedTestCase): diff --git a/cinderclient/tests/v2/test_type_access.py b/cinderclient/tests/unit/v2/test_type_access.py similarity index 94% rename from cinderclient/tests/v2/test_type_access.py rename to cinderclient/tests/unit/v2/test_type_access.py index bf9a6b282..7e41b3ee3 100644 --- a/cinderclient/tests/v2/test_type_access.py +++ b/cinderclient/tests/unit/v2/test_type_access.py @@ -15,8 +15,8 @@ # under the License. from cinderclient.v2 import volume_type_access -from cinderclient.tests import utils -from cinderclient.tests.v2 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v2 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v2/test_types.py b/cinderclient/tests/unit/v2/test_types.py similarity index 97% rename from cinderclient/tests/v2/test_types.py rename to cinderclient/tests/unit/v2/test_types.py index 674a13a50..db4cbc3bc 100644 --- a/cinderclient/tests/v2/test_types.py +++ b/cinderclient/tests/unit/v2/test_types.py @@ -15,8 +15,8 @@ # under the License. from cinderclient.v2 import volume_types -from cinderclient.tests import utils -from cinderclient.tests.v2 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v2 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v2/test_volume_backups.py b/cinderclient/tests/unit/v2/test_volume_backups.py similarity index 96% rename from cinderclient/tests/v2/test_volume_backups.py rename to cinderclient/tests/unit/v2/test_volume_backups.py index 916938de1..106b828ec 100644 --- a/cinderclient/tests/v2/test_volume_backups.py +++ b/cinderclient/tests/unit/v2/test_volume_backups.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v2 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v2 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v2/test_volume_encryption_types.py b/cinderclient/tests/unit/v2/test_volume_encryption_types.py similarity index 97% rename from cinderclient/tests/v2/test_volume_encryption_types.py rename to cinderclient/tests/unit/v2/test_volume_encryption_types.py index bba650319..9938dba18 100644 --- a/cinderclient/tests/v2/test_volume_encryption_types.py +++ b/cinderclient/tests/unit/v2/test_volume_encryption_types.py @@ -14,8 +14,8 @@ # under the License. from cinderclient.v2.volume_encryption_types import VolumeEncryptionType -from cinderclient.tests import utils -from cinderclient.tests.v2 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v2 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v1/test_volume_transfers.py b/cinderclient/tests/unit/v2/test_volume_transfers.py similarity index 95% rename from cinderclient/tests/v1/test_volume_transfers.py rename to cinderclient/tests/unit/v2/test_volume_transfers.py index 47656d794..4b27cb3f1 100644 --- a/cinderclient/tests/v1/test_volume_transfers.py +++ b/cinderclient/tests/unit/v2/test_volume_transfers.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v1 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v1 import fakes cs = fakes.FakeClient() diff --git a/cinderclient/tests/v2/test_volumes.py b/cinderclient/tests/unit/v2/test_volumes.py similarity index 99% rename from cinderclient/tests/v2/test_volumes.py rename to cinderclient/tests/unit/v2/test_volumes.py index aceb124e5..d94b47187 100644 --- a/cinderclient/tests/v2/test_volumes.py +++ b/cinderclient/tests/unit/v2/test_volumes.py @@ -14,8 +14,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.tests import utils -from cinderclient.tests.v2 import fakes +from cinderclient.tests.unit import utils +from cinderclient.tests.unit.v2 import fakes from cinderclient.v2.volumes import Volume cs = fakes.FakeClient()