summaryrefslogtreecommitdiff
path: root/oslo_db/tests/sqlalchemy/test_provision.py
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2021-07-16 12:55:49 +0100
committerStephen Finucane <stephenfin@redhat.com>2021-07-29 16:37:01 +0100
commita6007a98b1ea111c3d41c8c00578543fa47fcab0 (patch)
tree6dc36d84fed700daa04be73d8058b780f2cf9e1b /oslo_db/tests/sqlalchemy/test_provision.py
parent538e0a23abd8dfb7a2fe4a47655e759a50138b13 (diff)
downloadoslo-db-a6007a98b1ea111c3d41c8c00578543fa47fcab0.tar.gz
tests: Use common base class
The final step in cleaning up our many base classes. This will allow us to do things consistently across the test suite in future changes. Change-Id: I0bf663fdfd3c8be93e5658493e221d0a7db78832 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Diffstat (limited to 'oslo_db/tests/sqlalchemy/test_provision.py')
-rw-r--r--oslo_db/tests/sqlalchemy/test_provision.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/oslo_db/tests/sqlalchemy/test_provision.py b/oslo_db/tests/sqlalchemy/test_provision.py
index 97d91bf..f0ef944 100644
--- a/oslo_db/tests/sqlalchemy/test_provision.py
+++ b/oslo_db/tests/sqlalchemy/test_provision.py
@@ -13,7 +13,6 @@
import os
from unittest import mock
-from oslotest import base as oslo_test_base
from sqlalchemy import exc as sa_exc
from sqlalchemy import inspect
from sqlalchemy import schema
@@ -24,10 +23,11 @@ from oslo_db.sqlalchemy import enginefacade
from oslo_db.sqlalchemy import provision
from oslo_db.sqlalchemy import test_fixtures
from oslo_db.sqlalchemy import utils
-from oslo_db.tests.sqlalchemy import base as test_base
+from oslo_db.tests import base as test_base
+from oslo_db.tests.sqlalchemy import base as db_test_base
-class DropAllObjectsTest(test_base._DbTestCase):
+class DropAllObjectsTest(db_test_base._DbTestCase):
def setUp(self):
super(DropAllObjectsTest, self).setUp()
@@ -81,7 +81,7 @@ class DropAllObjectsTest(test_base._DbTestCase):
)
-class BackendNotAvailableTest(oslo_test_base.BaseTestCase):
+class BackendNotAvailableTest(test_base.BaseTestCase):
def test_no_dbapi(self):
backend = provision.Backend(
"postgresql", "postgresql+nosuchdbapi://hostname/dsn")
@@ -138,16 +138,18 @@ class BackendNotAvailableTest(oslo_test_base.BaseTestCase):
class MySQLDropAllObjectsTest(
- DropAllObjectsTest, test_base._MySQLOpportunisticTestCase):
+ DropAllObjectsTest, db_test_base._MySQLOpportunisticTestCase,
+):
pass
class PostgreSQLDropAllObjectsTest(
- DropAllObjectsTest, test_base._PostgreSQLOpportunisticTestCase):
+ DropAllObjectsTest, db_test_base._PostgreSQLOpportunisticTestCase,
+):
pass
-class RetainSchemaTest(oslo_test_base.BaseTestCase):
+class RetainSchemaTest(test_base.BaseTestCase):
DRIVER = "sqlite"
def setUp(self):
@@ -222,7 +224,7 @@ class PostgresqlRetainSchemaTest(RetainSchemaTest):
DRIVER = "postgresql"
-class AdHocURLTest(oslo_test_base.BaseTestCase):
+class AdHocURLTest(test_base.BaseTestCase):
def test_sqlite_setup_teardown(self):
fixture = test_fixtures.AdHocDbFixture("sqlite:///foo.db")