Use oslo_db.sqlalchemy.test_fixtures
The change in Ic5ce4a8555be4f80df69173ceefc03b73af65793 makes use of oslo_db.tests.*, which was not the intent of the deprecations added to oslo_db in I0163e637ffef6d45d2573ebe29b5438911d01fce. Make use of the newer fixtures in oslo_db.sqlalchemy.test_fixtures which is what was intended to supersede oslo_db.sqlalchemy.test_base. Change-Id: Iccea93e94e57992f2143b879baa206c87ecf2e6d
This commit is contained in:
parent
0643b3c22e
commit
b4471dbc49
|
@ -16,9 +16,11 @@ import netaddr
|
|||
from neutron_lib import context
|
||||
from neutron_lib.utils import net
|
||||
from oslo_db import exception
|
||||
from oslo_db.tests.sqlalchemy import base as test_base
|
||||
from oslo_db.sqlalchemy import enginefacade
|
||||
from oslo_db.sqlalchemy import test_fixtures
|
||||
from oslo_utils import timeutils
|
||||
from oslo_utils import uuidutils
|
||||
from oslotest import base as test_base
|
||||
import six
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
@ -27,9 +29,11 @@ from neutron.tests import tools
|
|||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class SqlAlchemyTypesBaseTestCase(test_base.DbTestCase):
|
||||
class SqlAlchemyTypesBaseTestCase(test_fixtures.OpportunisticDBTestMixin,
|
||||
test_base.BaseTestCase):
|
||||
def setUp(self):
|
||||
super(SqlAlchemyTypesBaseTestCase, self).setUp()
|
||||
self.engine = enginefacade.writer.get_engine()
|
||||
meta = sa.MetaData(bind=self.engine)
|
||||
self.test_table = self._get_test_table(meta)
|
||||
self.test_table.create()
|
||||
|
|
Loading…
Reference in New Issue