Update to use setup_extension

Update after the removal of _setUpExtension. [1]

[1] I8135fc4eb05e474db7224b7771b71270a93a47bf

This commit includes the following unrelated change
to pass the gate.
----------------------------------------
Fix cover job

Copy-and-paste from networking-midonet.

Closes-Bug: #1794509
Change-Id: I5ae3be917deb94673928a236662f953e4cd143ac
----------------------------------------

Closes-Bug: #1794457
Change-Id: Ia4d84c7f0dcea44e3131dd756853c003e9c8471d
This commit is contained in:
YAMAMOTO Takashi 2018-09-26 17:24:02 +09:00
parent 84846d52fd
commit 30809d7732
2 changed files with 9 additions and 5 deletions

View File

@ -35,10 +35,9 @@ class TaasExtensionTestCase(test_api_v2_extension.ExtensionTestCase):
def setUp(self):
super(TaasExtensionTestCase, self).setUp()
self._setUpExtension(
self.setup_extension(
'neutron_taas.extensions.taas.TaasPluginBase',
'TAAS',
taas_ext.RESOURCE_ATTRIBUTE_MAP,
taas_ext.Taas,
'taas',
plural_mappings={}

11
tox.ini
View File

@ -32,10 +32,15 @@ commands = {posargs}
[testenv:cover]
basepython = python2.7
commands =
python setup.py test --coverage --coverage-package-name=neutron_taas --testr-args='{posargs}'
setenv =
{[testenv]setenv}
PYTHON=coverage run --source neutron_taas --parallel-mode
commands =
stestr run --no-subunit-trace {posargs}
coverage combine
coverage report --fail-under=50 --skip-covered
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
commands = python setup.py build_sphinx