Files
deb-nova/nova/tests/functional/api/openstack/placement/test_placement_api.py
Chris Dent 5f887d851e [placement] Adjust the name of the gabbi tests
Recently there was some confusion caused by the fact the gabbi tests
used by the placement API have names like this:

    gabbi.suitemaker.test_placement_api_usage_create_provider

This means that the names cannot be matched against tox interactions
like:

    tox -efunctional -- nova.tests.functional.api.openstack

This change makes it so the tests are generated with names like:

    nova.tests.functional.api.openstack.placement.test_placement_api.usage_create_provider

So this change is submitted for review if people care. The other
option is to:

    tox -efunctional placement

gabbi was updated to allow this functionality in a clean form, so
this depends on a change to global requirements but can work
without it if required.

Depends-On: Ie93c0e680a80fc7f157e2b5b9dfc2ab17f934f10
Change-Id: I8579bf7529a7298c4d049e47cc3cde1731a5e666
2016-09-20 19:14:44 +00:00

29 lines
1.1 KiB
Python

# 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.
import os
from gabbi import driver
from nova.tests.functional.api.openstack.placement import fixtures
TESTS_DIR = 'gabbits'
def load_tests(loader, tests, pattern):
"""Provide a TestSuite to the discovery process."""
test_dir = os.path.join(os.path.dirname(__file__), TESTS_DIR)
return driver.build_tests(test_dir, loader, host=None,
test_loader_name=__name__,
intercept=fixtures.setup_app,
fixture_module=fixtures)