Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions airflow/providers/salesforce/example_dags/__init__.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ You can also use this library to call custom Apex methods:
This would call the endpoint ``https://<instance>.salesforce.com/services/apexrest/User/Activity`` with ``payload`` as
the body content encoded with ``json.dumps``

.. exampleinclude:: /../../airflow/providers/salesforce/example_dags/example_salesforce_apex_rest.py
.. exampleinclude:: /../../tests/system/providers/salesforce/example_salesforce_apex_rest.py
:language: python
:start-after: [START howto_salesforce_apex_rest_operator]
:end-before: [END howto_salesforce_apex_rest_operator]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import os
from datetime import datetime

from airflow import DAG
from airflow.providers.salesforce.operators.salesforce_apex_rest import SalesforceApexRestOperator

ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID")
DAG_ID = "example_gcs_to_trino"


with DAG(
dag_id="salesforce_apex_rest_operator_dag",
schedule_interval=None,
Expand All @@ -33,3 +38,9 @@
task_id="apex_task", method='POST', endpoint='User/Activity', payload=payload
)
# [END howto_salesforce_apex_rest_operator]


from tests.system.utils import get_test_run # noqa: E402

# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
test_run = get_test_run(dag)