uranusjr commented on code in PR #59630:
URL: https://github.com/apache/airflow/pull/59630#discussion_r2638597604


##########
airflow-core/tests/unit/cli/commands/test_pool_command.py:
##########
@@ -64,19 +67,28 @@ def test_pool_list_with_args(self):
 
     def test_pool_create(self):
         pool_command.pool_set(self.parser.parse_args(["pools", "set", "foo", 
"1", "test"]))
-        assert self.session.query(Pool).count() == 2
+        assert 
self.session.execute(select(func.count()).select_from(Pool)).scalar_one() == 2
 
     def test_pool_update_deferred(self):
         pool_command.pool_set(self.parser.parse_args(["pools", "set", "foo", 
"1", "test"]))
-        assert self.session.query(Pool).filter(Pool.pool == 
"foo").first().include_deferred is False
+        assert (
+            self.session.execute(select(Pool).where(Pool.pool == 
"foo")).scalars().first().include_deferred

Review Comment:
   ```suggestion
               self.session.scalar(select(Pool).where(Pool.pool == 
"foo")).include_deferred
   ```
   
   Same for many others here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to