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


##########
airflow-core/tests/unit/cli/commands/test_rotate_fernet_key_command.py:
##########
@@ -71,7 +72,7 @@ def test_should_rotate_variable(self, session):
         # Assert correctness using a new fernet key
         with conf_vars({("core", "fernet_key"): fernet_key2.decode()}):
             get_fernet.cache_clear()  # Clear cached fernet
-            var1 = session.query(Variable).filter(Variable.key == 
var1_key).first()
+            var1 = session.execute(select(Variable).where(Variable.key == 
var1_key)).scalar_one_or_none()

Review Comment:
   These are not equivalent



##########
airflow-core/tests/unit/cli/commands/test_rotate_fernet_key_command.py:
##########
@@ -71,7 +72,7 @@ def test_should_rotate_variable(self, session):
         # Assert correctness using a new fernet key
         with conf_vars({("core", "fernet_key"): fernet_key2.decode()}):
             get_fernet.cache_clear()  # Clear cached fernet
-            var1 = session.query(Variable).filter(Variable.key == 
var1_key).first()
+            var1 = session.execute(select(Variable).where(Variable.key == 
var1_key)).scalar_one_or_none()

Review Comment:
   These are not equivalent



-- 
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