Prab-27 commented on code in PR #59733:
URL: https://github.com/apache/airflow/pull/59733#discussion_r2649602827


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_pools.py:
##########
@@ -990,7 +991,7 @@ def test_update_mask_preserves_other_fields(self, 
test_client, session):
         assert response_data["update"]["success"] == ["pool1"]
 
         # Assert: fetch from DB and check only masked field changed
-        updated_pool = session.query(Pool).filter_by(pool="pool1").one()
+        updated_pool = session.execute(select(Pool).where(Pool.pool == 
"pool1")).scalar_one()

Review Comment:
   `.scalar()` works, but `.one()` or `scalar_one(`) are stricter for tests 
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