Replace use of Table.autoload parameter
Resolve the following RemovedIn20Warning warning: The autoload parameter is deprecated and will be removed in version 2.0. Please use the autoload_with parameter, passing an engine or connection. Change-Id: Ie039851005c6038591e0e1f6426922ca5b0dcb9a Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
d2f101cdfe
commit
6a013c606b
|
@ -47,11 +47,6 @@ class WarningsFixture(fixtures.Fixture):
|
|||
message=r'The Session.begin.subtransactions flag is deprecated .*',
|
||||
category=sqla_exc.SADeprecationWarning)
|
||||
|
||||
warnings.filterwarnings(
|
||||
'once',
|
||||
message=r'The autoload parameter is deprecated .*',
|
||||
category=sqla_exc.SADeprecationWarning)
|
||||
|
||||
warnings.filterwarnings(
|
||||
'once',
|
||||
message=r'Using non-integer/slice indices on Row is deprecated .*',
|
||||
|
|
|
@ -927,7 +927,7 @@ class TestMigrationUtils(db_test_base._DbTestCase):
|
|||
|
||||
utils._change_deleted_column_type_to_id_type_sqlite(self.engine,
|
||||
table_name)
|
||||
table = Table(table_name, self.meta, autoload=True)
|
||||
table = Table(table_name, self.meta, autoload_with=self.engine)
|
||||
# NOTE(I159): if the CHECK constraint has been dropped (expected
|
||||
# behavior), any integer value can be inserted, otherwise only 1 or 0.
|
||||
# NOTE(zzzeek): SQLAlchemy 1.2 Boolean type will disallow non 1/0
|
||||
|
|
Loading…
Reference in New Issue