Skip to content
Merged
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
6 changes: 4 additions & 2 deletions tests/dags/test_impersonation_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

from datetime import datetime

from airflow.models import DAG
from airflow.operators.python_operator import PythonOperator

# AIRFLOW-1893 - Originally, impersonation tests were incomplete missing the use case when
# DAGs access custom packages usually made available through the PYTHONPATH environment
# variable. This file includes a DAG that imports a custom package made available and if
Expand All @@ -27,8 +30,6 @@
# This DAG is used to test that impersonation propagates the PYTHONPATH environment
# variable correctly.

from airflow.models import DAG
from airflow.operators.python_operator import PythonOperator

DEFAULT_DATE = datetime(2016, 1, 1)

Expand All @@ -49,6 +50,7 @@ class FakeDatetime(datetime):
def __new__(cls, *args, **kwargs):
return datetime.__new__(datetime, *args, **kwargs)


def print_today():
date_time = FakeDatetime.utcnow()
print('Today is {}'.format(date_time.strftime('%Y-%m-%d')))
Expand Down