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/zendesk/example_dags/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion docs/apache-airflow-providers-zendesk/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Content
:caption: References

Python API <_api/airflow/providers/zendesk/index>
Example DAGs <https://github.com/apache/airflow/tree/main/airflow/providers/zendesk/example_dags>
Example DAGs <https://github.com/apache/airflow/tree/main/tests/system/providers/zendesk/example_zendesk_custom_get.py>
PyPI Repository <https://pypi.org/project/apache-airflow-providers-zendesk/>
Installing from sources <installing-providers-from-sources>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
# specific language governing permissions and limitations
# under the License.

import os
from datetime import datetime
from typing import Dict, List

from airflow import DAG
from airflow.decorators import task
from airflow.providers.zendesk.hooks.zendesk import ZendeskHook

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


@task
def fetch_organizations() -> List[Dict]:
Expand All @@ -33,9 +37,14 @@ def fetch_organizations() -> List[Dict]:


with DAG(
dag_id="zendesk_custom_get_dag",
dag_id=DAG_ID,
schedule_interval=None,
start_date=datetime(2021, 1, 1),
catchup=False,
) as dag:
fetch_organizations()

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)