ashb commented on a change in pull request #2334: [AIRFLOW-1252] API - Fix when
conf is in JSON body
URL: https://github.com/apache/incubator-airflow/pull/2334#discussion_r229014948
##########
File path: tests/api/common/experimental/trigger_dag_tests.py
##########
@@ -88,6 +88,48 @@ def test_trigger_dag_include_subdags(self, dag_bag_mock,
dag_run_mock, dag_mock)
self.assertEqual(3, len(triggers))
+ @mock.patch('airflow.models.DagRun')
+ @mock.patch('airflow.models.DagBag')
+ def test_trigger_dag_with_str_conf(self, dag_bag_mock, dag_run_mock):
+ dag_id = "dag_run_exist"
+ dag = DAG(dag_id)
+ dag_bag_mock.dags = [dag_id]
+ dag_bag_mock.get_dag.return_value = dag
+ dag_run_mock.find.return_value = DagRun()
+ conf = "{\"foo\": \"bar\"}"
+ self.assertRaises(
+ AirflowException,
Review comment:
Why are we expecting this to raise an exception?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services