make sql fixtures public
This patch makes the _StaticSqlFixture and _SqlFixture fixture classes public by removing the leading underscore in the name. Based on recent testing [1][2] the current versions of these fixtures seems to work for consumers. [1] https://review.opendev.org/#/c/657887/ [2] https://review.opendev.org/#/c/668000/ Change-Id: I5e9497d650176201407f0823f0fce46e009fb89c
This commit is contained in:
parent
89b542f4fa
commit
7a58374fde
@ -109,7 +109,7 @@ class _EnableSQLiteFKsFixture(fixtures.Fixture):
|
||||
self.addCleanup(disable_fks)
|
||||
|
||||
|
||||
class _SqlFixture(fixtures.Fixture):
|
||||
class SqlFixture(fixtures.Fixture):
|
||||
|
||||
@classmethod
|
||||
def _generate_schema(cls, engine):
|
||||
@ -156,7 +156,7 @@ class _SqlFixture(fixtures.Fixture):
|
||||
self.useFixture(_EnableSQLiteFKsFixture(engine))
|
||||
|
||||
|
||||
class _StaticSqlFixture(_SqlFixture):
|
||||
class StaticSqlFixture(SqlFixture):
|
||||
|
||||
_GLOBAL_RESOURCES = False
|
||||
|
||||
|
@ -23,4 +23,4 @@ class SqlTestCase(base.BaseTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(SqlTestCase, self).setUp()
|
||||
self.useFixture(fixture._SqlFixture())
|
||||
self.useFixture(fixture.SqlFixture())
|
||||
|
@ -61,7 +61,7 @@ class SqlFixtureTestCase(base.BaseTestCase):
|
||||
options.set_defaults(
|
||||
cfg.CONF,
|
||||
connection='sqlite://')
|
||||
self.fixture = fixture._StaticSqlFixture()
|
||||
self.fixture = fixture.StaticSqlFixture()
|
||||
self.useFixture(self.fixture)
|
||||
|
||||
def test_fixture(self):
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- The ``SqlFixture`` and ``StaticSqlFixture`` are now available in
|
||||
``neutron_lib.fixtures``.
|
Loading…
Reference in New Issue
Block a user