Merge "Remove function optimize_db_test_loader in test_base.py"

This commit is contained in:
Zuul 2018-01-05 06:38:03 +00:00 committed by Gerrit Code Review
commit f91554c2a7
3 changed files with 3 additions and 10 deletions

View File

@ -32,7 +32,6 @@ from oslo_db import exception
from oslo_db.sqlalchemy import enginefacade
from oslo_db.sqlalchemy import provision
from oslo_db.sqlalchemy import session
from oslo_db.sqlalchemy.test_fixtures import optimize_package_test_loader
@debtcollector.removals.removed_class("DbFixture")
@ -241,7 +240,3 @@ class MySQLOpportunisticTestCase(OpportunisticTestCase):
@debtcollector.removals.removed_class("PostgreSQLOpportunisticTestCase")
class PostgreSQLOpportunisticTestCase(OpportunisticTestCase):
FIXTURE = PostgreSQLOpportunisticFixture
optimize_db_test_loader = debtcollector.moves.moved_function(
optimize_package_test_loader, "optimize_db_test_loader", __name__)

View File

@ -402,8 +402,9 @@ class OpportunisticDbFixture(BaseDbFixture):
This fixture relies upon the use of the OpportunisticDBTestMixin to supply
a test.resources attribute, and also works much more effectively when
combined the testresources.OptimisingTestSuite. The
optimize_db_test_loader() function should be used at the module and package
levels to optimize database provisioning across many tests.
optimize_package_test_loader() function should be
used at the module and package levels to optimize database
provisioning across many tests.
"""
def __init__(self, test, driver=None, ident=None):

View File

@ -265,9 +265,6 @@ class TestLoadHook(unittest.TestCase):
def test_package_level(self):
self._test_package_level(test_fixtures.optimize_package_test_loader)
def test_package_level_legacy(self):
self._test_package_level(legacy_test_base.optimize_db_test_loader)
def _test_package_level(self, fn):
load_tests = fn(
os.path.join(start_dir, "__init__.py"))