From 3aca87e4fc305d49db314ce6467f7a63c4e8a526 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 15 Jul 2021 13:47:01 +0100 Subject: [PATCH] db: Replace deprecated 'FromClause.select().whereclause' parameter Resolve the following sqlalchemy.exc.RemovedIn20Warning warning: The FromClause.select().whereclause parameter is deprecated and will be removed in version 2.0. Please make use of the Select.where() method to add WHERE criteria to the SELECT statement. For more information, refer to http://sqlalche.me/e/b8d9. Change-Id: Ie93f52777da62fa98e8b33d4d1ca0ae6da4de9e0 Signed-off-by: Stephen Finucane --- placement/tests/functional/db/test_consumer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/placement/tests/functional/db/test_consumer.py b/placement/tests/functional/db/test_consumer.py index bb3581708..2ea2f65c6 100644 --- a/placement/tests/functional/db/test_consumer.py +++ b/placement/tests/functional/db/test_consumer.py @@ -134,7 +134,7 @@ class CreateIncompleteAllocationsMixin(object): sa.select(sa.func.count('*')).select_from(USER_TBL)) self.assertEqual(0, user_count) # Verify there are no consumer records for the missing consumers - sel = CONSUMER_TBL.select( + sel = CONSUMER_TBL.select().where( CONSUMER_TBL.c.uuid.in_([c1_missing_uuid, c2_missing_uuid])) res = ctx.session.execute(sel).fetchall() self.assertEqual(0, len(res))