Sagargupta16 commented on code in PR #63109:
URL: https://github.com/apache/airflow/pull/63109#discussion_r2912146066


##########
providers/salesforce/tests/unit/salesforce/operators/test_bulk.py:
##########
@@ -59,15 +97,16 @@ def test_execute_missing_object_name(self):
                 payload=[],
             )
 
+        operator = SalesforceBulkOperator(
+            task_id="missing_object_name",
+            operation="insert",
+            object_name="",
+            payload=[],
+        )
         with pytest.raises(
             ValueError, match="The required parameter 'object_name' cannot 
have an empty value."
         ):
-            SalesforceBulkOperator(
-                task_id="missing_object_name",
-                operation="insert",
-                object_name="",
-                payload=[],
-            )
+            operator.execute(context={})

Review Comment:
   Same reason as above -- the empty  validation also moved from `__init__` to 
`execute()`, so the test now creates the operator first, then asserts on 
`execute()`.



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