diff --git a/.testr.conf b/.testr.conf index 4da4d7db..70c6678f 100755 --- a/.testr.conf +++ b/.testr.conf @@ -2,6 +2,6 @@ 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 $DISCOVER_DIRECTORY $LISTOPT $IDOPTION + ${PYTHON:-python} -m subunit.run discover -t ./ ./muranoclient/tests $LISTOPT $IDOPTION test_id_option=--load-list $IDFILE test_list_option=--list diff --git a/muranoclient/tests/unit/__init__.py b/muranoclient/tests/unit/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/muranoclient/tests/base.py b/muranoclient/tests/unit/base.py similarity index 100% rename from muranoclient/tests/base.py rename to muranoclient/tests/unit/base.py diff --git a/muranoclient/tests/fakes.py b/muranoclient/tests/unit/fakes.py similarity index 100% rename from muranoclient/tests/fakes.py rename to muranoclient/tests/unit/fakes.py diff --git a/muranoclient/tests/fixture_data/heat-template.yaml b/muranoclient/tests/unit/fixture_data/heat-template.yaml similarity index 100% rename from muranoclient/tests/fixture_data/heat-template.yaml rename to muranoclient/tests/unit/fixture_data/heat-template.yaml diff --git a/muranoclient/tests/fixture_data/logo.png b/muranoclient/tests/unit/fixture_data/logo.png similarity index 100% rename from muranoclient/tests/fixture_data/logo.png rename to muranoclient/tests/unit/fixture_data/logo.png diff --git a/muranoclient/tests/fixture_data/test-app/Classes/testapp.yaml b/muranoclient/tests/unit/fixture_data/test-app/Classes/testapp.yaml similarity index 100% rename from muranoclient/tests/fixture_data/test-app/Classes/testapp.yaml rename to muranoclient/tests/unit/fixture_data/test-app/Classes/testapp.yaml diff --git a/muranoclient/tests/fixture_data/test-app/Resources/Deploy.template b/muranoclient/tests/unit/fixture_data/test-app/Resources/Deploy.template similarity index 100% rename from muranoclient/tests/fixture_data/test-app/Resources/Deploy.template rename to muranoclient/tests/unit/fixture_data/test-app/Resources/Deploy.template diff --git a/muranoclient/tests/fixture_data/test-app/Resources/scripts/common.sh b/muranoclient/tests/unit/fixture_data/test-app/Resources/scripts/common.sh similarity index 100% rename from muranoclient/tests/fixture_data/test-app/Resources/scripts/common.sh rename to muranoclient/tests/unit/fixture_data/test-app/Resources/scripts/common.sh diff --git a/muranoclient/tests/fixture_data/test-app/Resources/scripts/deploy.sh b/muranoclient/tests/unit/fixture_data/test-app/Resources/scripts/deploy.sh similarity index 100% rename from muranoclient/tests/fixture_data/test-app/Resources/scripts/deploy.sh rename to muranoclient/tests/unit/fixture_data/test-app/Resources/scripts/deploy.sh diff --git a/muranoclient/tests/fixture_data/test-app/Resources/scripts/installer.sh b/muranoclient/tests/unit/fixture_data/test-app/Resources/scripts/installer.sh similarity index 100% rename from muranoclient/tests/fixture_data/test-app/Resources/scripts/installer.sh rename to muranoclient/tests/unit/fixture_data/test-app/Resources/scripts/installer.sh diff --git a/muranoclient/tests/fixture_data/test-app/ui.yaml b/muranoclient/tests/unit/fixture_data/test-app/ui.yaml similarity index 100% rename from muranoclient/tests/fixture_data/test-app/ui.yaml rename to muranoclient/tests/unit/fixture_data/test-app/ui.yaml diff --git a/muranoclient/tests/test_common_http.py b/muranoclient/tests/unit/test_common_http.py similarity index 99% rename from muranoclient/tests/test_common_http.py rename to muranoclient/tests/unit/test_common_http.py index a9a857ab..65efd62a 100644 --- a/muranoclient/tests/test_common_http.py +++ b/muranoclient/tests/unit/test_common_http.py @@ -19,7 +19,7 @@ import testtools from muranoclient.common import exceptions as exc from muranoclient.common import http -from muranoclient.tests import fakes +from muranoclient.tests.unit import fakes @mock.patch('muranoclient.common.http.requests.request') diff --git a/muranoclient/tests/test_methods.py b/muranoclient/tests/unit/test_methods.py similarity index 100% rename from muranoclient/tests/test_methods.py rename to muranoclient/tests/unit/test_methods.py diff --git a/muranoclient/tests/test_package_creator.py b/muranoclient/tests/unit/test_package_creator.py similarity index 99% rename from muranoclient/tests/test_package_creator.py rename to muranoclient/tests/unit/test_package_creator.py index 89ab3794..9fea291b 100644 --- a/muranoclient/tests/test_package_creator.py +++ b/muranoclient/tests/unit/test_package_creator.py @@ -16,7 +16,7 @@ import os import shutil from muranoclient.openstack.common.apiclient import exceptions -from muranoclient.tests import base +from muranoclient.tests.unit import base from muranoclient.v1.package_creator import hot_package from muranoclient.v1.package_creator import mpl_package diff --git a/muranoclient/tests/test_shell.py b/muranoclient/tests/unit/test_shell.py similarity index 99% rename from muranoclient/tests/test_shell.py rename to muranoclient/tests/unit/test_shell.py index 0f7ac06c..c5ae44db 100644 --- a/muranoclient/tests/test_shell.py +++ b/muranoclient/tests/unit/test_shell.py @@ -31,8 +31,8 @@ from muranoclient.common import exceptions as common_exceptions from muranoclient.common import utils from muranoclient.openstack.common.apiclient import exceptions import muranoclient.shell -from muranoclient.tests import base -from muranoclient.tests import test_utils +from muranoclient.tests.unit import base +from muranoclient.tests.unit import test_utils from muranoclient.v1 import shell as v1_shell make_pkg = test_utils.make_pkg diff --git a/muranoclient/tests/test_utils.py b/muranoclient/tests/unit/test_utils.py similarity index 100% rename from muranoclient/tests/test_utils.py rename to muranoclient/tests/unit/test_utils.py diff --git a/tox.ini b/tox.ini index 81fd51b7..92516929 100644 --- a/tox.ini +++ b/tox.ini @@ -5,16 +5,17 @@ skipsdist = True [testenv] usedevelop = True +whitelist_externals = bash install_command = pip install -U {opts} {packages} -setenv = - VIRTUAL_ENV={envdir} +setenv = VIRTUAL_ENV={envdir} + deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = bash tools/pretty_tox.sh '{posargs}' [testenv:pep8] -commands = flake8 {posargs} +commands = flake8 {posargs} [testenv:venv] commands = {posargs}