airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From criccom...@apache.org
Subject [33/36] incubator-airflow git commit: [AIRFLOW-XXX] Fix merge issue with test/models.py by adding execution_date
Date Tue, 09 May 2017 17:36:02 GMT
[AIRFLOW-XXX] Fix merge issue with test/models.py by adding execution_date


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/d61af623
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/d61af623
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/d61af623

Branch: refs/heads/v1-8-stable
Commit: d61af623178253eb39a1fabd6116a94dca3f33a6
Parents: 0a105ee
Author: Chris Riccomini <criccomini@apache.org>
Authored: Thu Apr 27 13:15:37 2017 -0700
Committer: Chris Riccomini <criccomini@apache.org>
Committed: Thu Apr 27 13:15:37 2017 -0700

----------------------------------------------------------------------
 tests/models.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/d61af623/tests/models.py
----------------------------------------------------------------------
diff --git a/tests/models.py b/tests/models.py
index 981561a..da36d56 100644
--- a/tests/models.py
+++ b/tests/models.py
@@ -285,11 +285,13 @@ class DagStatTest(unittest.TestCase):
 
 class DagRunTest(unittest.TestCase):
 
-    def create_dag_run(self, dag, state=State.RUNNING, task_states=None):
+    def create_dag_run(self, dag, state=State.RUNNING, task_states=None, execution_date=None):
         now = datetime.datetime.now()
+        if execution_date is None:
+            execution_date = now
         dag_run = dag.create_dagrun(
             run_id='manual__' + now.isoformat(),
-            execution_date=now,
+            execution_date=execution_date,
             start_date=now,
             state=state,
             external_trigger=False,


Mime
View raw message