Move unit test code under tests/unit/
test.py was previously not in the tests directory. This means that downstream packagers of Cinder have to specifically exclude it from the main Cinder package (which does not typically include unit tests). Move it under the cinder/tests/unit/ dir where it should be, to clean this up. Change-Id: I65c50722f5990f540d84fa361b997302bbc935c5
This commit is contained in:
parent
07a4dd548c
commit
d4eb4a9ba1
|
@ -17,8 +17,8 @@ import re
|
|||
from oslo_serialization import jsonutils
|
||||
import six
|
||||
|
||||
from cinder import test
|
||||
from cinder.tests.functional import functional_helpers
|
||||
from cinder.tests.unit import test
|
||||
|
||||
PROJECT_ID = "6f70656e737461636b20342065766572"
|
||||
|
||||
|
|
|
@ -25,9 +25,9 @@ import fixtures
|
|||
from oslo_config import cfg
|
||||
|
||||
from cinder import service
|
||||
from cinder import test # For the flags
|
||||
from cinder.tests.functional.api import client
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test # For the flags
|
||||
|
||||
CONF = cfg.CONF
|
||||
VOLUME = 'VOLUME'
|
||||
|
|
|
@ -34,12 +34,12 @@ from cinder import objects
|
|||
from cinder.objects import base as obj_base
|
||||
from cinder.objects import fields
|
||||
from cinder.scheduler import rpcapi as scheduler_rpcapi
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import cast_as_call
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_snapshot
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils as test_utils
|
||||
from cinder.volume import api as volume_api
|
||||
from cinder.volume import rpcapi
|
||||
|
|
|
@ -19,7 +19,7 @@ from oslo_utils import timeutils
|
|||
|
||||
import cinder.api.contrib.availability_zones
|
||||
import cinder.context
|
||||
import cinder.test
|
||||
from cinder.tests.unit import test
|
||||
import cinder.volume.api
|
||||
|
||||
|
||||
|
@ -39,7 +39,7 @@ class FakeRequest(object):
|
|||
GET = {}
|
||||
|
||||
|
||||
class ControllerTestCase(cinder.test.TestCase):
|
||||
class ControllerTestCase(test.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(ControllerTestCase, self).setUp()
|
||||
|
|
|
@ -21,10 +21,10 @@ from cinder.api.v3 import router as router_v3
|
|||
from cinder.backup import api as backup_api
|
||||
from cinder import context
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.backup import fake_backup
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
def fake_backup_get(*args, **kwargs):
|
||||
|
|
|
@ -37,9 +37,9 @@ from cinder.i18n import _
|
|||
from cinder import objects
|
||||
from cinder.objects import fields
|
||||
from cinder import quota
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils
|
||||
# needed for stubs to work
|
||||
import cinder.volume
|
||||
|
|
|
@ -20,9 +20,9 @@ import oslo_messaging
|
|||
from cinder.api.contrib import capabilities
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
def rpcapi_get_capabilities(self, context, host, discover):
|
||||
|
|
|
@ -26,9 +26,9 @@ from cinder import db
|
|||
from cinder import exception
|
||||
from cinder.group import api as groupAPI
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils
|
||||
import cinder.volume
|
||||
|
||||
|
|
|
@ -29,10 +29,10 @@ import cinder.group
|
|||
from cinder.i18n import _
|
||||
from cinder import objects
|
||||
from cinder.objects import fields
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils
|
||||
from cinder.volume import api as volume_api
|
||||
|
||||
|
|
|
@ -22,11 +22,11 @@ import webob
|
|||
from cinder import context
|
||||
from cinder.objects import fields
|
||||
from cinder.policies import snapshots as snap_policy
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_snapshot
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
UUID1 = fake.SNAPSHOT_ID
|
||||
|
|
|
@ -25,8 +25,8 @@ from cinder.common import constants
|
|||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder.objects import service
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils as test_utils
|
||||
|
||||
|
||||
|
|
|
@ -25,9 +25,9 @@ from cinder import context
|
|||
from cinder import db
|
||||
from cinder import exception
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
def stub_qos_specs(id):
|
||||
|
|
|
@ -29,8 +29,8 @@ from cinder import context
|
|||
from cinder import db
|
||||
from cinder import exception
|
||||
from cinder import quota
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import test_db_api
|
||||
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ from cinder import context
|
|||
from cinder import db
|
||||
from cinder import exception
|
||||
from cinder import quota
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.volume import volume_types
|
||||
|
||||
|
||||
|
|
|
@ -22,10 +22,10 @@ from six.moves import http_client
|
|||
import cinder
|
||||
from cinder.api.openstack import wsgi
|
||||
from cinder import context
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
UUID = fakes.FAKE_UUID
|
||||
|
|
|
@ -24,9 +24,9 @@ from cinder.api import microversions as mv
|
|||
from cinder.api.openstack import api_version_request as api_version
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
def schedule_rpcapi_get_pools(self, context, filters=None):
|
||||
|
|
|
@ -29,9 +29,9 @@ from cinder.common import constants
|
|||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
|
@ -25,10 +25,10 @@ from cinder import context
|
|||
from cinder import db
|
||||
from cinder import exception
|
||||
from cinder.objects import fields
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
def fake_snapshot_get(context, snapshot_id):
|
||||
|
|
|
@ -26,10 +26,10 @@ from cinder.common import constants
|
|||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_service
|
||||
from cinder.tests.unit import test
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
|
|
@ -21,10 +21,10 @@ import webob
|
|||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder.objects import fields
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_snapshot
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
# This list of fake snapshot is used by our tests.
|
||||
|
|
|
@ -25,9 +25,9 @@ import webob
|
|||
from cinder.api.contrib import types_extra_specs
|
||||
from cinder import exception
|
||||
from cinder.image import glance as image_store
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
import cinder.wsgi
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
|
@ -23,9 +23,9 @@ import webob
|
|||
from cinder.api.contrib import types_manage
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.volume import volume_types
|
||||
|
||||
DEFAULT_VOLUME_TYPE = fake.VOLUME_TYPE_ID
|
||||
|
|
|
@ -21,9 +21,9 @@ from cinder.api.contrib import used_limits
|
|||
from cinder.api import microversions as mv
|
||||
from cinder.api.openstack import api_version_request
|
||||
from cinder.api.openstack import wsgi
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
class FakeRequest(object):
|
||||
|
|
|
@ -32,11 +32,11 @@ from cinder import db
|
|||
from cinder import exception
|
||||
from cinder.image import glance
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils
|
||||
from cinder import volume
|
||||
from cinder.volume import api as volume_api
|
||||
|
|
|
@ -21,9 +21,9 @@ from cinder.api.contrib import volume_encryption_metadata
|
|||
from cinder import context
|
||||
from cinder import db
|
||||
from cinder.objects import fields
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
def return_volume_type_encryption_metadata(context, volume_type_id):
|
||||
|
|
|
@ -22,10 +22,10 @@ from cinder import context
|
|||
from cinder import db
|
||||
from cinder import objects
|
||||
from cinder.objects import fields
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit import test
|
||||
from cinder import volume
|
||||
|
||||
|
||||
|
|
|
@ -30,10 +30,10 @@ from cinder.objects import fields
|
|||
from cinder.policies import base as base_policy
|
||||
from cinder.policies import volume_metadata as metadata_policy
|
||||
from cinder import policy
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit import test
|
||||
from cinder import volume
|
||||
|
||||
|
||||
|
|
|
@ -29,10 +29,10 @@ from cinder.api.openstack import api_version_request as api_version
|
|||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder.objects import fields
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit import test
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
|
|
@ -21,10 +21,10 @@ import webob
|
|||
from cinder import context
|
||||
from cinder import objects
|
||||
from cinder.objects import fields
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit import test
|
||||
from cinder import volume
|
||||
|
||||
|
||||
|
|
|
@ -22,10 +22,10 @@ from cinder import context
|
|||
from cinder import objects
|
||||
from cinder.policies.volumes import TENANT_ATTRIBUTE_POLICY
|
||||
from cinder import policy
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit import test
|
||||
from cinder import volume
|
||||
|
||||
|
||||
|
|
|
@ -27,10 +27,10 @@ from cinder import db
|
|||
from cinder import exception
|
||||
from cinder.objects import fields
|
||||
from cinder import quota
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
import cinder.transfer
|
||||
|
||||
|
||||
|
|
|
@ -22,9 +22,9 @@ from cinder.api.v2 import types as types_api_v2
|
|||
from cinder import context
|
||||
from cinder import db
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
def generate_type(type_id, is_public):
|
||||
|
|
|
@ -19,9 +19,9 @@ import webob
|
|||
|
||||
from cinder import context
|
||||
from cinder import db
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
def return_volume_type_encryption(context, volume_type_id):
|
||||
|
|
|
@ -22,9 +22,9 @@ from cinder import context
|
|||
from cinder import db
|
||||
from cinder import objects
|
||||
from cinder.objects import fields
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ from six.moves import http_client
|
|||
import webob
|
||||
|
||||
import cinder.api.middleware.auth
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
class TestCinderKeystoneContextMiddleware(test.TestCase):
|
||||
|
|
|
@ -19,7 +19,7 @@ import webob.dec
|
|||
|
||||
from cinder.api.middleware import fault
|
||||
from cinder.api.openstack import wsgi
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
class TestFaults(test.TestCase):
|
||||
|
|
|
@ -19,7 +19,7 @@ import six
|
|||
|
||||
from cinder.api.openstack import api_version_request
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
@ddt.ddt
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
import six
|
||||
|
||||
from cinder.api.openstack import versioned_method
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
class VersionedMethodTestCase(test.TestCase):
|
||||
|
|
|
@ -20,8 +20,8 @@ import webob
|
|||
|
||||
from cinder.api.openstack import wsgi
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
class RequestTest(test.TestCase):
|
||||
|
|
|
@ -24,7 +24,7 @@ from cinder.api.openstack import api_version_request as api_version
|
|||
from cinder.api import validation
|
||||
from cinder.api.validation import parameter_types
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
class FakeRequest(object):
|
||||
|
|
|
@ -25,7 +25,7 @@ import webob
|
|||
import webob.exc
|
||||
|
||||
from cinder.api import common
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
NS = "{http://docs.openstack.org/compute/api/v1.1}"
|
||||
|
|
|
@ -27,8 +27,8 @@ from cinder.api.openstack import wsgi
|
|||
from cinder.api.v3 import router
|
||||
from cinder.api import versions
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
|
@ -26,7 +26,7 @@ import webob
|
|||
from cinder.api.v2 import limits
|
||||
from cinder.api import views
|
||||
import cinder.context
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
TEST_LIMITS = [
|
||||
|
|
|
@ -29,12 +29,12 @@ import cinder.db
|
|||
from cinder import exception
|
||||
from cinder.objects import fields
|
||||
from cinder.scheduler import rpcapi as scheduler_rpcapi
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_snapshot
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit import test
|
||||
from cinder import volume
|
||||
|
||||
|
||||
|
|
|
@ -31,12 +31,12 @@ from cinder import exception
|
|||
from cinder import objects
|
||||
from cinder.objects import fields
|
||||
from cinder.scheduler import rpcapi as scheduler_rpcapi
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_snapshot
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils
|
||||
from cinder import volume
|
||||
|
||||
|
|
|
@ -25,9 +25,9 @@ from cinder.api.v2.views import types as views_types
|
|||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder.policies import volume_type as type_policy
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.volume import volume_types
|
||||
|
||||
|
||||
|
|
|
@ -27,11 +27,11 @@ from cinder.api.v2 import volumes
|
|||
from cinder import db
|
||||
from cinder import exception
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit import test
|
||||
from cinder import volume
|
||||
from cinder.volume import api as volume_api
|
||||
|
||||
|
|
|
@ -38,12 +38,12 @@ from cinder import exception
|
|||
from cinder import group as groupAPI
|
||||
from cinder import objects
|
||||
from cinder.objects import fields
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit.image import fake as fake_image
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils
|
||||
from cinder.volume import api as volume_api
|
||||
from cinder.volume import volume_types
|
||||
|
|
|
@ -28,9 +28,9 @@ from cinder import objects
|
|||
from cinder.policies import attachments as attachments_policies
|
||||
from cinder.policies import base as base_policy
|
||||
from cinder import policy
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.volume import api as volume_api
|
||||
from cinder.volume import rpcapi as volume_rpcapi
|
||||
from cinder.volume import volume_utils
|
||||
|
|
|
@ -31,9 +31,9 @@ import cinder.backup
|
|||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder.objects import fields
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils as test_utils
|
||||
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ from cinder.api.openstack import api_version_request as api_version
|
|||
from cinder.api.v3 import clusters
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_cluster
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
CLUSTERS = [
|
||||
|
|
|
@ -21,9 +21,9 @@ from cinder.api.v3 import consistencygroups
|
|||
from cinder import context
|
||||
from cinder import objects
|
||||
from cinder.objects import fields
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
@ddt.ddt
|
||||
|
|
|
@ -33,9 +33,9 @@ from cinder.objects import fields
|
|||
from cinder.policies import base as base_policy
|
||||
from cinder.policies import group_snapshots as group_snapshots_policy
|
||||
from cinder import policy
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils
|
||||
import cinder.volume
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ from cinder import context
|
|||
from cinder import db
|
||||
from cinder import exception
|
||||
from cinder import rpc
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
fake_group_specs = {
|
||||
'key1': 'value1',
|
||||
|
|
|
@ -28,9 +28,9 @@ from cinder.api.v3 import group_types as v3_group_types
|
|||
from cinder.api.v3.views import group_types as views_types
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.volume import group_types
|
||||
|
||||
IN_USE_GROUP_TYPE = fake.GROUP_TYPE3_ID
|
||||
|
|
|
@ -29,10 +29,10 @@ from cinder import exception
|
|||
import cinder.group
|
||||
from cinder import objects
|
||||
from cinder.objects import fields
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v3 import fakes as v3_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils
|
||||
from cinder.volume import api as volume_api
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ import ddt
|
|||
from cinder.api import microversions as mv
|
||||
from cinder.api.openstack import api_version_request as api_version
|
||||
from cinder.api.v3 import limits
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
LIMITS_FILTER = mv.LIMITS_ADMIN_FILTER
|
||||
PRE_LIMITS_FILTER = mv.get_prior_version(LIMITS_FILTER)
|
||||
|
|
|
@ -22,9 +22,9 @@ from cinder import context
|
|||
from cinder import exception
|
||||
from cinder.message import api as message_api
|
||||
from cinder.message import message_field
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v3 import fakes as v3_fakes
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
NS = '{http://docs.openstack.org/api/openstack-block-storage/3.0/content}'
|
||||
|
|
|
@ -19,9 +19,9 @@ import six
|
|||
|
||||
from cinder.api import microversions as mv
|
||||
from cinder.api.v3 import resource_filters as v3_filters
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
@ddt.ddt
|
||||
|
|
|
@ -26,11 +26,11 @@ from cinder.api.v3 import router as router_v3
|
|||
from cinder.common import constants
|
||||
from cinder import context
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api.contrib import test_snapshot_manage as test_contrib
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_service
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
|
@ -25,12 +25,12 @@ from cinder import db
|
|||
from cinder import exception
|
||||
from cinder.objects import fields
|
||||
from cinder.scheduler import rpcapi as scheduler_rpcapi
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_snapshot
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils as test_utils
|
||||
from cinder import volume
|
||||
|
||||
|
|
|
@ -14,9 +14,9 @@ from cinder.api import microversions as mv
|
|||
from cinder.api.v2 import types
|
||||
from cinder import context
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
class VolumeTypesApiTest(test.TestCase):
|
||||
|
|
|
@ -26,10 +26,10 @@ from cinder.api.v3 import router as router_v3
|
|||
from cinder.common import constants
|
||||
from cinder import context
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api.contrib import test_volume_manage as test_contrib
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
|
@ -25,12 +25,12 @@ from cinder import db
|
|||
from cinder import exception
|
||||
from cinder.objects import base as obj_base
|
||||
from cinder.scheduler import rpcapi as scheduler_rpcapi
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit.api.v2 import test_volume_metadata as v2_test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit import test
|
||||
from cinder import volume
|
||||
from cinder.volume import api as volume_api
|
||||
|
||||
|
|
|
@ -29,10 +29,10 @@ from cinder import context
|
|||
from cinder import db
|
||||
from cinder.objects import fields
|
||||
from cinder import quota
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
import cinder.transfer
|
||||
|
||||
|
||||
|
|
|
@ -38,12 +38,12 @@ from cinder.group import api as group_api
|
|||
from cinder import objects
|
||||
from cinder.objects import fields
|
||||
from cinder.policies import volumes as policy
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit.api.v2 import test_volumes as v2_test_volumes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit.image import fake as fake_image
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils as test_utils
|
||||
from cinder.volume import api as volume_api
|
||||
from cinder.volume import api as vol_get
|
||||
|
|
|
@ -26,9 +26,9 @@ from cinder.api.v3 import workers
|
|||
from cinder.common import constants
|
||||
from cinder import context
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
SERVICES = (
|
||||
|
|
|
@ -18,7 +18,7 @@ import copy
|
|||
import ddt
|
||||
|
||||
from cinder.api.views import versions
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
class FakeRequest(object):
|
||||
|
|
|
@ -22,9 +22,9 @@ from cinder import objects
|
|||
from cinder.policies import attachments as attachment_policy
|
||||
from cinder.policies import base as base_policy
|
||||
from cinder import policy
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils as tests_utils
|
||||
from cinder.volume import api as volume_api
|
||||
from cinder.volume import configuration as conf
|
||||
|
|
|
@ -20,9 +20,9 @@ from cinder import db
|
|||
from cinder import exception
|
||||
from cinder.objects import fields
|
||||
from cinder.objects import volume_attachment
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils as tests_utils
|
||||
from cinder.volume import configuration as conf
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@ from cinder import db
|
|||
from cinder import exception
|
||||
from cinder.i18n import _
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
import cinder.volume.drivers.rbd as rbd_driver
|
||||
|
||||
# This is used to collect raised exceptions so that tests may check what was
|
||||
|
|
|
@ -24,8 +24,8 @@ from cinder import context
|
|||
from cinder import db
|
||||
from cinder import exception
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.backup import fake_service
|
||||
from cinder.tests.unit import test
|
||||
|
||||
_backup_db_fields = ['id', 'user_id', 'project_id',
|
||||
'volume_id', 'host', 'availability_zone',
|
||||
|
|
|
@ -21,7 +21,7 @@ from os_brick.remotefs import remotefs as remotefs_brick
|
|||
from cinder.backup.drivers import glusterfs
|
||||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
from cinder import utils
|
||||
|
||||
FAKE_BACKUP_MOUNT_POINT_BASE = '/fake/mount-point-base'
|
||||
|
|
|
@ -35,10 +35,10 @@ from cinder import db
|
|||
from cinder import exception
|
||||
from cinder.i18n import _
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.backup import fake_google_client
|
||||
from cinder.tests.unit.backup import fake_google_client2
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
class FakeMD5(object):
|
||||
|
|
|
@ -38,8 +38,8 @@ from cinder import db
|
|||
from cinder import exception
|
||||
from cinder.i18n import _
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ from six.moves import builtins
|
|||
from cinder.backup.drivers import posix
|
||||
from cinder import context
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
FAKE_FILE_SIZE = 52428800
|
||||
|
|
|
@ -36,10 +36,10 @@ from cinder import db
|
|||
from cinder import exception
|
||||
from cinder.i18n import _
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.backup import fake_swift_client
|
||||
from cinder.tests.unit.backup import fake_swift_client2
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
|
@ -27,8 +27,8 @@ from cinder import context
|
|||
from cinder import db
|
||||
from cinder import exception
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
SIM = None
|
||||
VOLUME_PATH = '/dev/null'
|
||||
|
|
|
@ -37,10 +37,10 @@ from cinder import exception
|
|||
from cinder import objects
|
||||
from cinder.objects import fields
|
||||
from cinder import quota
|
||||
from cinder import test
|
||||
from cinder.tests import fake_driver
|
||||
from cinder.tests.unit.api.v2 import fakes as v2_fakes
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils
|
||||
from cinder.volume import rpcapi as volume_rpcapi
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ from cinder import context
|
|||
from cinder import exception
|
||||
from cinder import objects
|
||||
from cinder.objects import fields
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
|
@ -20,9 +20,9 @@ from unittest import mock
|
|||
|
||||
from cinder.backup import rpcapi as backup_rpcapi
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit.backup import fake_backup
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
class BackupRPCAPITestCase(test.RPCAPITestCase):
|
||||
|
|
|
@ -20,7 +20,7 @@ from oslo_concurrency import processutils
|
|||
|
||||
from cinder.brick.local_dev import lvm as brick
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
from cinder.volume import configuration as conf
|
||||
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ from cinder import context
|
|||
from cinder import db
|
||||
from cinder.db.sqlalchemy import api as sqla_api
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fakes
|
||||
from cinder.tests.unit import test
|
||||
import cinder.volume.manager as volume_manager
|
||||
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ from oslo_config import cfg
|
|||
from cinder.compute import nova
|
||||
from cinder import context
|
||||
from cinder.message import message_field
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ def set_defaults(conf):
|
|||
conf.set_default('transport_url', 'fake:/')
|
||||
conf.set_default('connection', 'sqlite://', group='database')
|
||||
conf.set_default('sqlite_synchronous', False, group='database')
|
||||
conf.set_default('policy_file', 'cinder.tests.unit/policy.json',
|
||||
conf.set_default('policy_file', '/this/path/does/not/exist',
|
||||
group='oslo_policy')
|
||||
conf.set_default('backup_driver',
|
||||
'cinder.tests.unit.backup.fake_service.FakeBackupService')
|
||||
|
|
|
@ -18,8 +18,8 @@ from oslo_config import cfg
|
|||
|
||||
from cinder import context
|
||||
from cinder import db
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils as testutils
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ from sqlalchemy_utils import functions as saf
|
|||
|
||||
from cinder.db.sqlalchemy import api as db_api
|
||||
from cinder.db.sqlalchemy import models
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
class VolumeRelationshipsTestCase(test.TestCase):
|
||||
|
|
|
@ -27,7 +27,7 @@ from cinder import context
|
|||
from cinder import db
|
||||
from cinder.db.sqlalchemy import api as db_api
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
class PurgeDeletedTest(test.TestCase):
|
||||
|
|
|
@ -22,8 +22,8 @@ import time
|
|||
from cinder import context
|
||||
from cinder import db
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.volume import volume_types
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ from cinder import db
|
|||
from cinder.db.sqlalchemy import api as db_api
|
||||
from cinder.db.sqlalchemy import models
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils
|
||||
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
from cinder import context
|
||||
from cinder import db
|
||||
from cinder import exception
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils
|
||||
from cinder.volume import volume_types
|
||||
|
||||
|
|
|
@ -27,9 +27,9 @@ from cinder import objects
|
|||
from cinder.objects import fields
|
||||
from cinder.policies import group_snapshots as g_snap_policies
|
||||
from cinder import quota
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils
|
||||
|
||||
|
||||
|
|
|
@ -24,12 +24,12 @@ from cinder import exception
|
|||
from cinder import objects
|
||||
from cinder.objects import fields
|
||||
from cinder import quota
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import fake_group
|
||||
from cinder.tests.unit import fake_group_snapshot
|
||||
from cinder.tests.unit import fake_snapshot
|
||||
from cinder.tests.unit import fake_volume
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils as tests_utils
|
||||
from cinder.volume import api as volume_api
|
||||
from cinder.volume import configuration as conf
|
||||
|
|
|
@ -23,8 +23,8 @@ from cinder import exception
|
|||
from cinder import objects
|
||||
from cinder.objects import fields
|
||||
from cinder import quota
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils as tests_utils
|
||||
from cinder.volume import api as volume_api
|
||||
from cinder.volume import configuration as conf
|
||||
|
|
|
@ -15,7 +15,7 @@ from unittest import mock
|
|||
|
||||
from cinder import exception
|
||||
from cinder.image import accelerator
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
class TestAccelerators(test.TestCase):
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
from unittest import mock
|
||||
|
||||
from cinder.image import accelerator
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
class fakeEngine(object):
|
||||
|
|
|
@ -22,8 +22,8 @@ from cinder import context as ctxt
|
|||
from cinder.db.sqlalchemy import models
|
||||
from cinder.image import cache as image_cache
|
||||
from cinder import objects
|
||||
from cinder import test
|
||||
from cinder.tests.unit import fake_constants as fake
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
@ddt.ddt
|
||||
|
|
|
@ -29,8 +29,8 @@ from cinder import context
|
|||
from cinder import exception
|
||||
from cinder.image import glance
|
||||
from cinder import service_auth
|
||||
from cinder import test
|
||||
from cinder.tests.unit.glance import stubs as glance_stubs
|
||||
from cinder.tests.unit import test
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
|
@ -25,7 +25,7 @@ from oslo_config import cfg
|
|||
from cinder import context
|
||||
from cinder import exception
|
||||
from cinder.keymgr import conf_key_mgr
|
||||
from cinder import test
|
||||
from cinder.tests.unit import test
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('fixed_key', 'cinder.keymgr.conf_key_mgr', group='key_manager')
|
||||
|
|
|
@ -23,9 +23,9 @@ from cinder import context
|
|||
from cinder import exception
|
||||
from cinder.message import api as message_api
|
||||
from cinder.message import message_field
|
||||
from cinder import test
|
||||
from cinder.tests.unit.api import fakes
|
||||
import cinder.tests.unit.fake_constants as fake_constants
|
||||
from cinder.tests.unit import test
|
||||
from cinder.tests.unit import utils
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue