diff options
author | Stephen Finucane <stephenfin@redhat.com> | 2021-07-16 12:55:49 +0100 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2021-07-29 16:37:01 +0100 |
commit | a6007a98b1ea111c3d41c8c00578543fa47fcab0 (patch) | |
tree | 6dc36d84fed700daa04be73d8058b780f2cf9e1b /oslo_db/tests/sqlalchemy/test_fixtures.py | |
parent | 538e0a23abd8dfb7a2fe4a47655e759a50138b13 (diff) | |
download | oslo-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_fixtures.py')
-rw-r--r-- | oslo_db/tests/sqlalchemy/test_fixtures.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/oslo_db/tests/sqlalchemy/test_fixtures.py b/oslo_db/tests/sqlalchemy/test_fixtures.py index 97f8d64..72f4f93 100644 --- a/oslo_db/tests/sqlalchemy/test_fixtures.py +++ b/oslo_db/tests/sqlalchemy/test_fixtures.py @@ -21,12 +21,12 @@ from oslo_db.sqlalchemy import enginefacade from oslo_db.sqlalchemy import provision from oslo_db.sqlalchemy import test_base as legacy_test_base from oslo_db.sqlalchemy import test_fixtures -from oslotest import base as oslo_test_base +from oslo_db.tests import base as test_base start_dir = os.path.dirname(__file__) -class BackendSkipTest(oslo_test_base.BaseTestCase): +class BackendSkipTest(test_base.BaseTestCase): def test_skip_no_dbapi(self): @@ -35,7 +35,7 @@ class BackendSkipTest(oslo_test_base.BaseTestCase): DRIVER = 'postgresql' class SomeTest(test_fixtures.OpportunisticDBTestMixin, - oslo_test_base.BaseTestCase): + test_base.BaseTestCase): FIXTURE = FakeDatabaseOpportunisticFixture def runTest(self): @@ -77,7 +77,7 @@ class BackendSkipTest(oslo_test_base.BaseTestCase): DRIVER = 'postgresql+nosuchdbapi' class SomeTest(test_fixtures.OpportunisticDBTestMixin, - oslo_test_base.BaseTestCase): + test_base.BaseTestCase): FIXTURE = FakeDatabaseOpportunisticFixture @@ -99,7 +99,8 @@ class BackendSkipTest(oslo_test_base.BaseTestCase): def test_skip_no_dbapi_legacy(self): class FakeDatabaseOpportunisticFixture( - legacy_test_base.DbFixture): + legacy_test_base.DbFixture, + ): DRIVER = 'postgresql' class SomeTest(legacy_test_base.DbTestCase): @@ -140,7 +141,8 @@ class BackendSkipTest(oslo_test_base.BaseTestCase): def test_skip_no_such_backend_legacy(self): class FakeDatabaseOpportunisticFixture( - legacy_test_base.DbFixture): + legacy_test_base.DbFixture, + ): DRIVER = 'postgresql+nosuchdbapi' class SomeTest(legacy_test_base.DbTestCase): @@ -163,7 +165,7 @@ class BackendSkipTest(oslo_test_base.BaseTestCase): ) -class EnginefacadeIntegrationTest(oslo_test_base.BaseTestCase): +class EnginefacadeIntegrationTest(test_base.BaseTestCase): def test_db_fixture(self): normal_mgr = enginefacade.transaction_context() normal_mgr.configure( @@ -204,7 +206,7 @@ class EnginefacadeIntegrationTest(oslo_test_base.BaseTestCase): self.assertFalse(normal_mgr._factory._started) -class LegacyBaseClassTest(oslo_test_base.BaseTestCase): +class LegacyBaseClassTest(test_base.BaseTestCase): def test_new_db_is_provisioned_by_default_pg(self): self._test_new_db_is_provisioned_by_default( legacy_test_base.PostgreSQLOpportunisticTestCase |