Merge "Correct mistake: deletion of __init__.py in tests"
This commit is contained in:
commit
18bfed36de
|
@ -1,7 +1,4 @@
|
|||
[DEFAULT]
|
||||
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 ./ . $LISTOPT $IDOPTION
|
||||
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./cerberus/tests/unit/} $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
|
@ -1,15 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2014 EUROGICIEL
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
|
@ -1,15 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2015 EUROGICIEL
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
|
@ -19,7 +19,7 @@ import pecan.testing
|
|||
|
||||
from cerberus.api import auth
|
||||
from cerberus.db import api as dbapi
|
||||
from cerberus.tests import base
|
||||
from cerberus.tests.unit import base
|
||||
|
||||
|
||||
PATH_PREFIX = '/v1'
|
|
@ -15,14 +15,14 @@
|
|||
#
|
||||
|
||||
import json
|
||||
import mock
|
||||
from sqlalchemy import exc
|
||||
|
||||
import mock
|
||||
from oslo import messaging
|
||||
|
||||
from cerberus import db
|
||||
from cerberus.tests.api import base
|
||||
from cerberus.tests.db import utils as db_utils
|
||||
from cerberus.tests.unit.api import base
|
||||
from cerberus.tests.unit.db import utils as db_utils
|
||||
|
||||
|
||||
PLUGIN_ID_1 = 1
|
|
@ -14,12 +14,14 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from sqlalchemy import exc as sql_exc
|
||||
|
||||
import mock
|
||||
|
||||
from cerberus import db
|
||||
from cerberus.tests.api import base
|
||||
from cerberus.tests.db import utils as db_utils
|
||||
from cerberus.tests.unit.api import base
|
||||
from cerberus.tests.unit.db import utils as db_utils
|
||||
|
||||
|
||||
SECURITY_ALARM_ID = 'abc123'
|
||||
SECURITY_ALARM_ID_2 = 'xyz789'
|
|
@ -14,12 +14,14 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from sqlalchemy import exc as sql_exc
|
||||
|
||||
import mock
|
||||
|
||||
from cerberus import db
|
||||
from cerberus.tests.api import base
|
||||
from cerberus.tests.db import utils as db_utils
|
||||
from cerberus.tests.unit.api import base
|
||||
from cerberus.tests.unit.db import utils as db_utils
|
||||
|
||||
|
||||
SECURITY_REPORT_ID = 'abc123'
|
||||
SECURITY_REPORT_ID_2 = 'xyz789'
|
|
@ -15,13 +15,13 @@
|
|||
#
|
||||
|
||||
import json
|
||||
import mock
|
||||
|
||||
import mock
|
||||
from oslo import messaging
|
||||
|
||||
from cerberus.api.v1.datamodels import task as task_model
|
||||
from cerberus.tests.api import base
|
||||
from cerberus.tests.db import utils as db_utils
|
||||
from cerberus.tests.unit.api import base
|
||||
from cerberus.tests.unit.db import utils as db_utils
|
||||
|
||||
|
||||
class MockTask(object):
|
|
@ -18,9 +18,9 @@ import os
|
|||
from oslo.config import cfg
|
||||
from oslotest import base
|
||||
|
||||
from cerberus.tests import config_fixture
|
||||
from cerberus.tests import policy_fixture
|
||||
from cerberus.tests import utils
|
||||
from cerberus.tests.unit import config_fixture
|
||||
from cerberus.tests.unit import policy_fixture
|
||||
from cerberus.tests.unit import utils
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
|
@ -15,11 +15,10 @@
|
|||
#
|
||||
|
||||
import mock
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from cerberus.client import keystone_client
|
||||
from cerberus.tests import base
|
||||
from cerberus.tests.unit import base
|
||||
|
||||
cfg.CONF.import_group('service_credentials', 'cerberus.service')
|
||||
|
|
@ -15,11 +15,10 @@
|
|||
#
|
||||
|
||||
import mock
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from cerberus.client import neutron_client
|
||||
from cerberus.tests import base
|
||||
from cerberus.tests.unit import base
|
||||
|
||||
cfg.CONF.import_group('service_credentials', 'cerberus.service')
|
||||
|
|
@ -15,11 +15,10 @@
|
|||
#
|
||||
|
||||
import mock
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from cerberus.client import nova_client
|
||||
from cerberus.tests import base
|
||||
from cerberus.tests.unit import base
|
||||
|
||||
cfg.CONF.import_group('service_credentials', 'cerberus.service')
|
||||
|
|
@ -14,14 +14,15 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import fixtures
|
||||
import os
|
||||
|
||||
import fixtures
|
||||
from oslo.config import cfg
|
||||
|
||||
from cerberus.common import policy as cerberus_policy
|
||||
from cerberus.openstack.common import policy as common_policy
|
||||
from cerberus.tests import fake_policy
|
||||
from cerberus.tests.unit import fake_policy
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
|
@ -25,10 +25,10 @@ from eventlet import greenpool
|
|||
import json
|
||||
import mock
|
||||
import pkg_resources
|
||||
from stevedore import extension
|
||||
import uuid
|
||||
|
||||
from oslo import messaging
|
||||
from stevedore import extension
|
||||
|
||||
from cerberus.common import errors
|
||||
from cerberus.common import loopingcall
|
||||
|
@ -36,8 +36,8 @@ from cerberus.common import threadgroup
|
|||
from cerberus.db.sqlalchemy import api as db_api
|
||||
from cerberus import manager
|
||||
from cerberus.plugins import base as base_plugin
|
||||
from cerberus.tests import base
|
||||
from cerberus.tests.db import utils as db_utils
|
||||
from cerberus.tests.unit import base
|
||||
from cerberus.tests.unit.db import utils as db_utils
|
||||
|
||||
|
||||
PLUGIN_UUID = 'UUID'
|
||||
|
@ -228,7 +228,7 @@ class TestCerberusManager(base.TestBase):
|
|||
def test_get_plugins(self):
|
||||
ctx = {"some": "context"}
|
||||
json_plugin1 = {
|
||||
"name": "cerberus.tests.test_cerberus_manager.FakePlugin",
|
||||
"name": "cerberus.tests.unit.test_cerberus_manager.FakePlugin",
|
||||
"subscribed_events":
|
||||
[
|
||||
],
|
||||
|
@ -249,7 +249,7 @@ class TestCerberusManager(base.TestBase):
|
|||
c_manager.cerberus_manager = self.extension_mgr
|
||||
|
||||
json_plugin1 = {
|
||||
"name": "cerberus.tests.test_cerberus_manager.FakePlugin",
|
||||
"name": "cerberus.tests.unit.test_cerberus_manager.FakePlugin",
|
||||
"subscribed_events":
|
||||
[
|
||||
],
|
|
@ -19,12 +19,11 @@ Tests for `db api` module.
|
|||
"""
|
||||
|
||||
import mock
|
||||
|
||||
from oslo.config import fixture as fixture_config
|
||||
|
||||
from cerberus.db.sqlalchemy import api
|
||||
from cerberus.openstack.common.db.sqlalchemy import models as db_models
|
||||
from cerberus.tests import base
|
||||
from cerberus.tests.unit import base
|
||||
|
||||
|
||||
class DbApiTestCase(base.TestBase):
|
|
@ -14,14 +14,14 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
import uuid
|
||||
|
||||
import mock
|
||||
from oslo.config import cfg
|
||||
|
||||
from cerberus import notifications
|
||||
from cerberus.openstack.common.fixture import moxstubout
|
||||
from cerberus.tests import base
|
||||
from cerberus.tests.unit import base
|
||||
|
||||
|
||||
EXP_RESOURCE_TYPE = uuid.uuid4().hex
|
|
@ -14,6 +14,8 @@ python-subunit
|
|||
nose
|
||||
nose-exclude
|
||||
nosexcover
|
||||
mox>=0.5.3,<=0.5.3
|
||||
tempest-lib>=0.5.0
|
||||
|
||||
# Doc requirements
|
||||
sphinx>=1.1.2,!=1.2.0,<1.3
|
||||
|
|
13
tox.ini
13
tox.ini
|
@ -6,20 +6,24 @@ skipsdist = True
|
|||
[testenv]
|
||||
usedevelop = True
|
||||
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 -c "TESTS_DIR=./cerberus/tests/unit/ python setup.py testr --slowest --testr-args='{posargs}'"
|
||||
|
||||
[tox:jenkins]
|
||||
downloadcache = ~/cache/pip
|
||||
|
||||
[testenv:pep8]
|
||||
commands = flake8
|
||||
commands = flake8 {posargs} cerberus
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
commands =
|
||||
nosetests --with-xunit --with-xcoverage --cover-package=cerberus --nocapture --cover-tests --cover-branches --cover-min-percentage=50
|
||||
python setup.py testr --coverage {posargs}
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
|
@ -47,4 +51,3 @@ ignore = E125,E126,E128,E129,E265,E713,F402,F811,F812,H104,H237,H305,H307,H401,H
|
|||
show-source = true
|
||||
builtins = _
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|
||||
|
||||
|
|
Loading…
Reference in New Issue