ahilashsasidharan commented on code in PR #70831:
URL: https://github.com/apache/airflow/pull/70831#discussion_r3701291900


##########
providers/databricks/tests/unit/databricks/sensors/test_databricks.py:
##########
@@ -68,16 +68,18 @@ def test_init_statement_id(self):
         assert op.statement_id == STATEMENT_ID
         assert op.warehouse_id == WAREHOUSE_ID
 
-    @pytest.mark.parametrize(
-        ("kwargs", "match"),
-        [
-            ({"statement": STATEMENT, "statement_id": STATEMENT_ID}, "Cannot 
provide both"),
-            ({}, "One of either statement or statement_id"),
-        ],
-    )
-    def test_statement_combination_validated_at_execute(self, kwargs, match):
-        op = DatabricksSQLStatementsSensor(task_id=TASK_ID, 
warehouse_id=WAREHOUSE_ID, **kwargs)
-        with pytest.raises(AirflowException, match=match):
+    def test_both_statements_included_validated_at_init(self):
+        with pytest.raises(ValueError, match="Cannot provide both"):
+            DatabricksSQLStatementsSensor(
+                statement=STATEMENT,
+                statement_id=STATEMENT_ID,
+                task_id=TASK_ID,
+                warehouse_id=WAREHOUSE_ID,
+            )

Review Comment:
   Done. I've changed this testcase and edited the second testcase to cover the 
case of why the sibling case in execute() is not converted to is None.



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