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
This commit is contained in:
parent
e2afc016b2
commit
e5a1304791
@ -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'
|
@ -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
|
||||
|
@ -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):
|
@ -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
|
||||
|
||||
|
@ -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()
|
@ -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):
|
@ -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({
|
@ -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
|
@ -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
|
||||
|
@ -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'
|
||||
|
@ -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 = [
|
@ -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
|
||||
|
||||
|
@ -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):
|
@ -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):
|
@ -15,7 +15,7 @@
|
||||
|
||||
import mock
|
||||
|
||||
from cinderclient.tests import utils
|
||||
from cinderclient.tests.unit import utils
|
||||
from cinderclient.v1 import limits
|
||||
|
||||
|
@ -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()
|
@ -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()
|
@ -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()
|
@ -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
|
||||
|
||||
|
@ -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):
|
@ -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):
|
@ -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()
|
||||
|
@ -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()
|
@ -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()
|
||||
|
@ -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()
|
@ -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()
|
0
cinderclient/tests/unit/v2/contrib/__init__.py
Normal file
0
cinderclient/tests/unit/v2/contrib/__init__.py
Normal file
@ -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 = [
|
@ -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
|
||||
|
||||
|
@ -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):
|
@ -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):
|
@ -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()
|
@ -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()
|
@ -15,7 +15,7 @@
|
||||
|
||||
import mock
|
||||
|
||||
from cinderclient.tests import utils
|
||||
from cinderclient.tests.unit import utils
|
||||
from cinderclient.v2 import limits
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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()
|
@ -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()
|
@ -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()
|
@ -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
|
||||
|
||||
|
@ -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):
|
@ -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):
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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()
|
@ -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()
|
||||
|
@ -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()
|
@ -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()
|
Loading…
Reference in New Issue
Block a user