From 6b7bc9f37bde3a88b75aa47153487591cdd537fd Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 6 Sep 2022 10:58:34 +0100 Subject: [PATCH] test: Rename Database fixture to DatabaseFixture Make it a little more obvious what this is. Signed-off-by: Stephen Finucane Change-Id: I5297a81d319ae850f0f4d3b63ca0cba7ac2b2a34 --- manila/test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manila/test.py b/manila/test.py index 1e528edc9c..10dd525894 100644 --- a/manila/test.py +++ b/manila/test.py @@ -60,7 +60,7 @@ CONF.register_opts(test_opts) _DB_CACHE = None -class Database(fixtures.Fixture): +class DatabaseFixture(fixtures.Fixture): def __init__(self, db_session, db_migrate, sql_connection, sqlite_db, sqlite_clean_db): @@ -86,7 +86,7 @@ class Database(fixtures.Fixture): shutil.copyfile(testdb, cleandb) def setUp(self): - super(Database, self).setUp() + super().setUp() if self.sql_connection == "sqlite://": conn = self.engine.connect() conn.connection.executescript(self._DB) @@ -116,7 +116,7 @@ class TestCase(base_test.BaseTestCase): global _DB_CACHE if not _DB_CACHE: - _DB_CACHE = Database( + _DB_CACHE = DatabaseFixture( db_api, migration, sql_connection=CONF.database.connection,