summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhangyangyang <zhangyangyang@unionpay.com>2017-09-07 15:57:23 +0800
committerzhangyangyang <zhangyangyang@unionpay.com>2017-09-07 19:57:15 +0800
commitf64264ebb94dd8f0b3c1d0eacfa769ecd2567998 (patch)
tree94df14ce4ed31d2d71f3bb162f0caf99bf819f22
parent69910499a7056c131913f591e54c5628efd17879 (diff)
downloadoslo-db-f64264ebb94dd8f0b3c1d0eacfa769ecd2567998.tar.gz
Remove function optimize_db_test_loader in test_base.py
optimize_db_test_loader is replaced by optimize_package_test_loader in test_fixtures.py.So this function is deprecated for removal. Change-Id: I12cdf846f1e23d74ae8a87bea33fbc8477974bfc Closes-Bug:#1715572
-rw-r--r--oslo_db/sqlalchemy/test_base.py5
-rw-r--r--oslo_db/sqlalchemy/test_fixtures.py5
-rw-r--r--oslo_db/tests/sqlalchemy/test_fixtures.py3
3 files changed, 3 insertions, 10 deletions
diff --git a/oslo_db/sqlalchemy/test_base.py b/oslo_db/sqlalchemy/test_base.py
index 4c9c2c7..401cb11 100644
--- a/oslo_db/sqlalchemy/test_base.py
+++ b/oslo_db/sqlalchemy/test_base.py
@@ -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__)
diff --git a/oslo_db/sqlalchemy/test_fixtures.py b/oslo_db/sqlalchemy/test_fixtures.py
index 57980ff..210df67 100644
--- a/oslo_db/sqlalchemy/test_fixtures.py
+++ b/oslo_db/sqlalchemy/test_fixtures.py
@@ -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):
diff --git a/oslo_db/tests/sqlalchemy/test_fixtures.py b/oslo_db/tests/sqlalchemy/test_fixtures.py
index b769e20..6950c3b 100644
--- a/oslo_db/tests/sqlalchemy/test_fixtures.py
+++ b/oslo_db/tests/sqlalchemy/test_fixtures.py
@@ -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"))