Пример #1
0
    def test_cli_report(self):
        args = self.parser.parse_args(['dags', 'report'])
        with contextlib.redirect_stdout(io.StringIO()) as temp_stdout:
            dag_command.dag_report(args)
            out = temp_stdout.getvalue()

        self.assertIn("airflow/example_dags/example_complex.py ", out)
        self.assertIn("['example_complex']", out)
Пример #2
0
    def test_cli_report(self):
        args = self.parser.parse_args(['dags', 'report', '--output', 'json'])
        with contextlib.redirect_stdout(io.StringIO()) as temp_stdout:
            dag_command.dag_report(args)
            out = temp_stdout.getvalue()

        assert "airflow/example_dags/example_complex.py" in out
        assert "example_complex" in out