Lee-W commented on code in PR #74448:
URL: https://github.com/apache/airflow/pull/74448#discussion_r4227319632


##########
providers/common/ai/tests/unit/common/ai/toolsets/test_sql.py:
##########
@@ -548,6 +548,42 @@ def 
test_a_row_carrying_the_connection_password_reaches_the_model_masked(self, r
 
 
 class TestSQLToolsetCheckQuery:
+    @pytest.mark.parametrize(
+        ("allow_writes", "expected_valid"),
+        [(False, False), (True, True)],
+    )
+    def test_write_statement_validity_follows_allow_writes(self, allow_writes, 
expected_valid):

Review Comment:
   Added 
`test_malformed_write_is_invalid_for_check_query_but_still_reaches_the_hook_for_query`
   
   With `allow_writes=True` and no allow-list, `INSERT INTO users VALUES (` is 
`valid: false` from `check_query` while `query` still reaches the hook. 
Flipping either `require_parse` makes it fail.
   



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