potiuk commented on code in PR #30432:
URL: https://github.com/apache/airflow/pull/30432#discussion_r1157559572


##########
tests/cli/commands/test_dag_command.py:
##########
@@ -470,6 +470,52 @@ 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"])
+        with contextlib.redirect_stdout(io.StringIO()) as temp_stdout:
+            dag_command.dag_details(args)
+            out = temp_stdout.getvalue()
+
+        # Check if DAG Details field are present
+        dag_details_fields = [

Review Comment:
   This is not the right way. You should check attributes of the dag rather 
than list the fields by hand. If we ad a new field we wll 100% forget to add it 
here.



-- 
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