Move tests into manilaclient package

tests/__init__.py implies a package in the global namespace called tests.
That's not what these are, they are tests in the manilaclient namespace.

Also moved unit tests to dir 'unit', it is done so because 'functional' tests
are expected to be added.

Change-Id: I801214b865e9cef8db7511f209dcf3c26b75d70f
This commit is contained in:
vponomaryov 2014-10-20 11:51:16 +03:00
parent d931e8c33b
commit 745adb323f
25 changed files with 32 additions and 33 deletions

View File

@ -2,7 +2,7 @@
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ ./tests $LISTOPT $IDOPTION
${PYTHON:-python} -m subunit.run discover -t ./ ./manilaclient/tests/unit $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -12,9 +12,9 @@
from manilaclient import exceptions
from manilaclient.openstack.common.apiclient import base as common_base
from manilaclient.tests.unit import utils
from manilaclient.tests.unit.v1 import fakes
from manilaclient.v1 import shares
from tests import utils
from tests.v1 import fakes
cs = fakes.FakeClient()

View File

@ -11,8 +11,8 @@
# under the License.
import manilaclient.client
from manilaclient.tests.unit import utils
import manilaclient.v1.client
from tests import utils
class ClientTest(utils.TestCase):

View File

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

View File

@ -12,7 +12,7 @@
from manilaclient import exceptions
from manilaclient import service_catalog
from tests import utils
from manilaclient.tests.unit import utils
# Taken directly from keystone/content/common/samples/auth.json

View File

@ -18,8 +18,8 @@ from six import moves
from testtools import matchers
from manilaclient import exceptions
import manilaclient.shell
from tests import utils
from manilaclient import shell
from manilaclient.tests.unit import utils
class ShellTest(utils.TestCase):
@ -42,7 +42,7 @@ class ShellTest(utils.TestCase):
orig = sys.stdout
try:
sys.stdout = moves.StringIO()
_shell = manilaclient.shell.OpenStackManilaShell()
_shell = shell.OpenStackManilaShell()
_shell.main(argstr.split())
except SystemExit:
exc_type, exc_value, exc_traceback = sys.exc_info()

View File

View File

@ -18,9 +18,9 @@ except ImportError:
import urllib.parse as urlparse
from manilaclient import client as base_client
from manilaclient.tests.unit import fakes
from manilaclient.tests.unit import utils
from manilaclient.v1 import client
from tests import fakes
import tests.utils as utils
class FakeClient(fakes.FakeClient, client.Client):

View File

@ -15,8 +15,8 @@
from __future__ import print_function
from manilaclient.tests.unit.v1 import fake_clients as fakes
from manilaclient.v1 import client
from tests.v1 import fake_clients as fakes
class FakeClient(fakes.FakeClient):

View File

@ -20,8 +20,8 @@ import mock
import requests
from manilaclient import exceptions
from manilaclient.tests.unit import utils
from manilaclient.v1 import client
from tests import utils
class AuthenticateAgainstKeystoneTests(utils.TestCase):

View File

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

View File

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

View File

@ -15,9 +15,9 @@
import mock
from manilaclient import exceptions
from manilaclient.tests.unit import utils
from manilaclient.tests.unit.v1 import fakes
from manilaclient.v1 import security_services
from tests import utils
from tests.v1 import fakes
class SecurityServiceTest(utils.TestCase):

View File

@ -15,8 +15,8 @@
import mock
from manilaclient.tests.unit import utils
from manilaclient.v1 import services
from tests import utils
class ServicesTest(utils.TestCase):

View File

@ -15,9 +15,9 @@
import mock
from manilaclient import exceptions
from manilaclient.tests.unit import utils
from manilaclient.tests.unit.v1 import fakes
from manilaclient.v1 import share_networks
from tests import utils
from tests.v1 import fakes
class ShareNetworkTest(utils.TestCase):

View File

@ -15,8 +15,8 @@
import mock
from manilaclient.tests.unit import utils
from manilaclient.v1 import share_servers
from tests import utils
class FakeShareServer(object):

View File

@ -16,9 +16,9 @@
# under the License.
from manilaclient import extension
from manilaclient.tests.unit import utils
from manilaclient.tests.unit.v1 import fakes
from manilaclient.v1 import share_snapshots
from tests import utils
from tests.v1 import fakes
extensions = [

View File

@ -19,9 +19,9 @@ import mock
from manilaclient import exceptions
from manilaclient import extension
from manilaclient.tests.unit import utils
from manilaclient.tests.unit.v1 import fakes
from manilaclient.v1 import shares
from tests import utils
from tests.v1 import fakes
extensions = [

View File

@ -25,11 +25,11 @@ from manilaclient import exceptions
from manilaclient.openstack.common import cliutils
from manilaclient.openstack.common import jsonutils
from manilaclient import shell
from manilaclient.tests.unit import utils as test_utils
from manilaclient.tests.unit.v1 import fakes
from manilaclient import utils
from manilaclient.v1 import client as client_v1
from manilaclient.v1 import shell as shell_v1
from tests import utils as test_utils
from tests.v1 import fakes
class ShellTest(test_utils.TestCase):

View File

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

View File

@ -1 +0,0 @@
__author__ = 'vkostenko'