hussein-awala commented on code in PR #30432:
URL: https://github.com/apache/airflow/pull/30432#discussion_r1166027156


##########
tests/cli/commands/test_dag_command.py:
##########
@@ -470,6 +471,28 @@ def test_cli_report(self):
         assert "airflow/example_dags/example_complex.py" in out
         assert "example_complex" in out
 
+    @conf_vars({("core", "load_examples"): "true"})
+    def test_cli_get_dag_details(self):
+        args = self.parser.parse_args(["dags", "details", "example_complex", 
"--output", "yaml"])
+        dag_id = "example_complex"
+        with contextlib.redirect_stdout(io.StringIO()) as temp_stdout:
+            dag_command.dag_details(args)
+            out = temp_stdout.getvalue()
+
+        with create_session() as session:
+            dag = session.query(DagModel).filter(DagModel.dag_id == 
dag_id).one_or_none()
+            dag_detail_fields = dag_schema.dump(dag)

Review Comment:
   I found a solution to avoid the skip condition by using:
   ```python
   dag_detail_fields = DAGSchema().fields.keys()
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to