vatsrahul1001 commented on code in PR #46920:
URL: https://github.com/apache/airflow/pull/46920#discussion_r1966479568


##########
tests/cli/commands/remote_commands/test_backfill_command.py:
##########
@@ -101,3 +101,29 @@ def test_backfill(self, mock_create, repro, 
expected_repro):
             dag_run_conf=None,
             reprocess_behavior=expected_repro,
         )
+
+    
@mock.patch("airflow.cli.commands.remote_commands.backfill_command._do_dry_run")
+    def test_backfill_dry_run(self, mock_dry_run):
+        args = [
+            "backfill",
+            "create",
+            "--dag-id",
+            "example_bash_operator",
+            "--from-date",
+            DEFAULT_DATE.isoformat(),
+            "--to-date",
+            DEFAULT_DATE.isoformat(),
+            "--dry-run",
+            "--reprocess-behavior",
+            "none",
+        ]
+        
airflow.cli.commands.remote_commands.backfill_command.create_backfill(self.parser.parse_args(args))
+
+        mock_dry_run.assert_called_once_with(
+            dag_id="example_bash_operator",
+            from_date=DEFAULT_DATE.replace(tzinfo=timezone.utc),
+            to_date=DEFAULT_DATE.replace(tzinfo=timezone.utc),
+            reverse=False,

Review Comment:
   This test is just covering dry run feature. I have added parameterized test 
for True as well.



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