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:
John Griffith 2015-03-06 09:55:26 -07:00
parent e2afc016b2
commit e5a1304791
57 changed files with 86 additions and 86 deletions

View File

@ -11,7 +11,7 @@
# under the License. # under the License.
from datetime import datetime 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 # FIXME(jamielennox): use timeutils from oslo
FORMAT = '%Y-%m-%d %H:%M:%S' FORMAT = '%Y-%m-%d %H:%M:%S'

View File

@ -12,7 +12,7 @@
from keystoneclient import fixture 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.v1 import client as v1client
from cinderclient.v2 import client as v2client from cinderclient.v2 import client as v2client

View File

@ -12,7 +12,7 @@
import json import json
from cinderclient.tests.fixture_data import base from cinderclient.tests.unit.fixture_data import base
def _stub_snapshot(**kwargs): def _stub_snapshot(**kwargs):

View File

@ -25,7 +25,7 @@ except ImportError:
from cinderclient import auth_plugin from cinderclient import auth_plugin
from cinderclient import exceptions from cinderclient import exceptions
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.v1 import client from cinderclient.v1 import client

View File

@ -14,8 +14,8 @@
from cinderclient import base from cinderclient import base
from cinderclient import exceptions from cinderclient import exceptions
from cinderclient.v1 import volumes from cinderclient.v1 import volumes
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v1 import fakes from cinderclient.tests.unit.v1 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -18,7 +18,7 @@ import fixtures
import cinderclient.client import cinderclient.client
import cinderclient.v1.client import cinderclient.v1.client
import cinderclient.v2.client import cinderclient.v2.client
from cinderclient.tests import utils from cinderclient.tests.unit import utils
class ClientTest(utils.TestCase): class ClientTest(utils.TestCase):

View File

@ -17,7 +17,7 @@ import requests
from cinderclient import client from cinderclient import client
from cinderclient import exceptions from cinderclient import exceptions
from cinderclient.tests import utils from cinderclient.tests.unit import utils
fake_response = utils.TestResponse({ fake_response = utils.TestResponse({

View File

@ -13,7 +13,7 @@
from cinderclient import exceptions from cinderclient import exceptions
from cinderclient import service_catalog 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 # Taken directly from keystone/content/common/samples/auth.json

View File

@ -23,8 +23,8 @@ from testtools import matchers
from cinderclient import exceptions from cinderclient import exceptions
from cinderclient import shell from cinderclient import shell
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.fixture_data import keystone_client from cinderclient.tests.unit.fixture_data import keystone_client
import keystoneclient.exceptions as ks_exc import keystoneclient.exceptions as ks_exc
from keystoneclient.exceptions import DiscoveryFailure from keystoneclient.exceptions import DiscoveryFailure

View File

@ -19,7 +19,7 @@ from six import moves
from cinderclient import exceptions from cinderclient import exceptions
from cinderclient import utils from cinderclient import utils
from cinderclient import base 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' UUID = '8e8ec658-c7b0-4243-bdf8-6f7f2952c0d0'

View File

@ -14,8 +14,8 @@
from cinderclient import extension from cinderclient import extension
from cinderclient.v1.contrib import list_extensions from cinderclient.v1.contrib import list_extensions
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v1 import fakes from cinderclient.tests.unit.v1 import fakes
extensions = [ extensions = [

View File

@ -21,8 +21,8 @@ except ImportError:
import urllib.parse as urlparse import urllib.parse as urlparse
from cinderclient import client as base_client from cinderclient import client as base_client
from cinderclient.tests import fakes from cinderclient.tests.unit import fakes
import cinderclient.tests.utils as utils import cinderclient.tests.unit.utils as utils
from cinderclient.v1 import client from cinderclient.v1 import client

View File

@ -18,7 +18,7 @@ import requests
from cinderclient.v1 import client from cinderclient.v1 import client
from cinderclient import exceptions from cinderclient import exceptions
from cinderclient.tests import utils from cinderclient.tests.unit import utils
class AuthenticateAgainstKeystoneTests(utils.TestCase): class AuthenticateAgainstKeystoneTests(utils.TestCase):

View File

@ -18,9 +18,9 @@ import six
from cinderclient.v1 import availability_zones from cinderclient.v1 import availability_zones
from cinderclient.v1 import shell from cinderclient.v1 import shell
from cinderclient.tests.fixture_data import client from cinderclient.tests.unit.fixture_data import client
from cinderclient.tests.fixture_data import availability_zones as azfixture from cinderclient.tests.unit.fixture_data import availability_zones as azfixture # noqa
from cinderclient.tests import utils from cinderclient.tests.unit import utils
class AvailabilityZoneTest(utils.FixturedTestCase): class AvailabilityZoneTest(utils.FixturedTestCase):

View File

@ -15,7 +15,7 @@
import mock import mock
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.v1 import limits from cinderclient.v1 import limits

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v1 import fakes from cinderclient.tests.unit.v1 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v1 import fakes from cinderclient.tests.unit.v1 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v1 import fakes from cinderclient.tests.unit.v1 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v1 import fakes from cinderclient.tests.unit.v1 import fakes
from cinderclient.v1 import services from cinderclient.v1 import services

View File

@ -22,9 +22,9 @@ from cinderclient import client
from cinderclient import exceptions from cinderclient import exceptions
from cinderclient import shell from cinderclient import shell
from cinderclient.v1 import shell as shell_v1 from cinderclient.v1 import shell as shell_v1
from cinderclient.tests.v1 import fakes from cinderclient.tests.unit.v1 import fakes
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.fixture_data import keystone_client from cinderclient.tests.unit.fixture_data import keystone_client
class ShellTest(utils.TestCase): class ShellTest(utils.TestCase):

View File

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.fixture_data import client from cinderclient.tests.unit.fixture_data import client
from cinderclient.tests.fixture_data import snapshots from cinderclient.tests.unit.fixture_data import snapshots
class SnapshotActionsTest(utils.FixturedTestCase): class SnapshotActionsTest(utils.FixturedTestCase):

View File

@ -12,8 +12,8 @@
# limitations under the License. # limitations under the License.
from cinderclient.v1 import volume_types from cinderclient.v1 import volume_types
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v1 import fakes from cinderclient.tests.unit.v1 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v1 import fakes from cinderclient.tests.unit.v1 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -14,8 +14,8 @@
# under the License. # under the License.
from cinderclient.v1.volume_encryption_types import VolumeEncryptionType from cinderclient.v1.volume_encryption_types import VolumeEncryptionType
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v1 import fakes from cinderclient.tests.unit.v1 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v1 import fakes from cinderclient.tests.unit.v1 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -11,8 +11,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v1 import fakes from cinderclient.tests.unit.v1 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -16,8 +16,8 @@
from cinderclient import extension from cinderclient import extension
from cinderclient.v2.contrib import list_extensions from cinderclient.v2.contrib import list_extensions
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v1 import fakes from cinderclient.tests.unit.v1 import fakes
extensions = [ extensions = [

View File

@ -20,8 +20,8 @@ except ImportError:
import urllib.parse as urlparse import urllib.parse as urlparse
from cinderclient import client as base_client from cinderclient import client as base_client
from cinderclient.tests import fakes from cinderclient.tests.unit import fakes
import cinderclient.tests.utils as utils import cinderclient.tests.unit.utils as utils
from cinderclient.v2 import client from cinderclient.v2 import client

View File

@ -21,7 +21,7 @@ import requests
from cinderclient import exceptions from cinderclient import exceptions
from cinderclient.v2 import client from cinderclient.v2 import client
from cinderclient.tests import utils from cinderclient.tests.unit import utils
class AuthenticateAgainstKeystoneTests(utils.TestCase): class AuthenticateAgainstKeystoneTests(utils.TestCase):

View File

@ -18,9 +18,9 @@ import six
from cinderclient.v2 import availability_zones from cinderclient.v2 import availability_zones
from cinderclient.v2 import shell from cinderclient.v2 import shell
from cinderclient.tests.fixture_data import client from cinderclient.tests.unit.fixture_data import client
from cinderclient.tests.fixture_data import availability_zones as azfixture from cinderclient.tests.unit.fixture_data import availability_zones as azfixture # noqa
from cinderclient.tests import utils from cinderclient.tests.unit import utils
class AvailabilityZoneTest(utils.FixturedTestCase): class AvailabilityZoneTest(utils.FixturedTestCase):

View File

@ -14,8 +14,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v2 import fakes from cinderclient.tests.unit.v2 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -14,8 +14,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v2 import fakes from cinderclient.tests.unit.v2 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -15,7 +15,7 @@
import mock import mock
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.v2 import limits from cinderclient.v2 import limits

View File

@ -14,8 +14,8 @@
# under the License. # under the License.
from cinderclient.v2.pools import Pool from cinderclient.v2.pools import Pool
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v2 import fakes from cinderclient.tests.unit.v2 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v2 import fakes from cinderclient.tests.unit.v2 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v2 import fakes from cinderclient.tests.unit.v2 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v2 import fakes from cinderclient.tests.unit.v2 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v2 import fakes from cinderclient.tests.unit.v2 import fakes
from cinderclient.v2 import services from cinderclient.v2 import services

View File

@ -21,9 +21,9 @@ from six.moves.urllib import parse
from cinderclient import client from cinderclient import client
from cinderclient import exceptions from cinderclient import exceptions
from cinderclient import shell from cinderclient import shell
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v2 import fakes from cinderclient.tests.unit.v2 import fakes
from cinderclient.tests.fixture_data import keystone_client from cinderclient.tests.unit.fixture_data import keystone_client
class ShellTest(utils.TestCase): class ShellTest(utils.TestCase):

View File

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.fixture_data import client from cinderclient.tests.unit.fixture_data import client
from cinderclient.tests.fixture_data import snapshots from cinderclient.tests.unit.fixture_data import snapshots
class SnapshotActionsTest(utils.FixturedTestCase): class SnapshotActionsTest(utils.FixturedTestCase):

View File

@ -15,8 +15,8 @@
# under the License. # under the License.
from cinderclient.v2 import volume_type_access from cinderclient.v2 import volume_type_access
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v2 import fakes from cinderclient.tests.unit.v2 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -15,8 +15,8 @@
# under the License. # under the License.
from cinderclient.v2 import volume_types from cinderclient.v2 import volume_types
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v2 import fakes from cinderclient.tests.unit.v2 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v2 import fakes from cinderclient.tests.unit.v2 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -14,8 +14,8 @@
# under the License. # under the License.
from cinderclient.v2.volume_encryption_types import VolumeEncryptionType from cinderclient.v2.volume_encryption_types import VolumeEncryptionType
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v2 import fakes from cinderclient.tests.unit.v2 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v1 import fakes from cinderclient.tests.unit.v1 import fakes
cs = fakes.FakeClient() cs = fakes.FakeClient()

View File

@ -14,8 +14,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.tests import utils from cinderclient.tests.unit import utils
from cinderclient.tests.v2 import fakes from cinderclient.tests.unit.v2 import fakes
from cinderclient.v2.volumes import Volume from cinderclient.v2.volumes import Volume
cs = fakes.FakeClient() cs = fakes.FakeClient()