Add missing bind argument to calls
Resolve the following RemovedIn20Warning warning: The ``bind`` argument for schema methods that invoke SQL against an engine or connection will be required in SQLAlchemy 2.0. Change-Id: If9492a3842055dde3841eaeb72fb4c050563b6ac Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
872bc1ddcc
commit
d949861094
|
@ -37,11 +37,6 @@ class WarningsFixture(fixtures.Fixture):
|
|||
# ...but filter everything out until we get around to fixing them
|
||||
# FIXME(stephenfin): Remove all of these
|
||||
|
||||
warnings.filterwarnings(
|
||||
'once',
|
||||
message=r'The ``bind`` argument for schema methods .*',
|
||||
category=sqla_exc.SADeprecationWarning)
|
||||
|
||||
warnings.filterwarnings(
|
||||
'once',
|
||||
message=r'The Session.autocommit parameter is deprecated .*',
|
||||
|
|
|
@ -57,13 +57,12 @@ class RegexpFilterTestCase(db_test_base._DbTestCase):
|
|||
def setUp(self):
|
||||
super(RegexpFilterTestCase, self).setUp()
|
||||
meta = MetaData()
|
||||
meta.bind = self.engine
|
||||
test_table = Table(_REGEXP_TABLE_NAME, meta,
|
||||
Column('id', Integer, primary_key=True,
|
||||
nullable=False),
|
||||
Column('bar', String(255)))
|
||||
test_table.create()
|
||||
self.addCleanup(test_table.drop)
|
||||
test_table.create(self.engine)
|
||||
self.addCleanup(test_table.drop, self.engine)
|
||||
|
||||
def _test_regexp_filter(self, regexp, expected):
|
||||
with enginefacade.writer.using(db_test_base.context):
|
||||
|
|
Loading…
Reference in New Issue