eladkal commented on code in PR #62908:
URL: https://github.com/apache/airflow/pull/62908#discussion_r2901660563
##########
providers/salesforce/tests/unit/salesforce/operators/test_salesforce_apex_rest.py:
##########
@@ -47,3 +55,135 @@ def test_execute_salesforce_apex_rest(self, mock_get_conn):
mock_get_conn.return_value.apexecute.assert_called_once_with(
action=endpoint, method=method, data=payload
)
+
+
@patch("airflow.providers.salesforce.operators.salesforce_apex_rest.SalesforceHook.get_conn")
+ def test_execute_salesforce_apex_rest_get(self, mock_get_conn):
+ """
+ Test execute apex rest with GET method
+ """
+
+ endpoint = "User/Activity"
+ method = "GET"
+ payload = {"user": "12345"}
+
+ mock_get_conn.return_value.apexecute = Mock()
+
+ operator = SalesforceApexRestOperator(
+ task_id="task", endpoint=endpoint, method=method, payload=payload
+ )
+
+ operator.execute(context={})
+
+ mock_get_conn.return_value.apexecute.assert_called_once_with(
+ action=endpoint, method=method, data=payload
+ )
Review Comment:
How is this related to templating?
--
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]