Add WebTest as dependency for testing

Latest pecan release dropped this dependency. This is why now it is
needed to explicitly install it during testing.

This patch also registers the Neutron core common config options in
``TaasExtensionTestCase``. Since [1], the configuration options
must be explicitly loaded.

[1]https://review.opendev.org/c/openstack/neutron/+/837392

Closes-Bug: #1982110
Change-Id: I3d8cd840881a2c67e7b07458276d600e214d028e
This commit is contained in:
Rodolfo Alonso Hernandez 2022-07-09 14:20:04 +00:00
parent fedca42dbd
commit 1ff8830e5c
2 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,7 @@ from webob import exc
from oslo_utils import uuidutils
from neutron.api import extensions
from neutron.conf import common as conf_common
from neutron.tests.unit.api.v2 import test_base as test_api_v2
from neutron.tests.unit.extensions import base as test_extensions_base
from neutron_lib.api.definitions import taas as taas_api
@ -35,6 +36,7 @@ TAP_FLOW_PATH = 'taas/tap_flows'
class TaasExtensionTestCase(test_extensions_base.ExtensionTestCase):
def setUp(self):
conf_common.register_core_common_config_opts()
extensions.append_api_extensions_path(taas_extensions.__path__)
super(TaasExtensionTestCase, self).setUp()
plural_mappings = {'tap_service': 'tap_services',

View File

@ -21,3 +21,4 @@ mock>=3.0.0 # BSD
astroid==2.1.0 # LGPLv2.1
pylint==2.2.0 # GPLv2
isort==4.3.21 # MIT
WebTest>=2.0.27 # MIT