diff --git a/airflow-core/tests/unit/cli/commands/test_db_command.py b/airflow-core/tests/unit/cli/commands/test_db_command.py index cd7d61f5f2467..363dd21b2ea25 100644 --- a/airflow-core/tests/unit/cli/commands/test_db_command.py +++ b/airflow-core/tests/unit/cli/commands/test_db_command.py @@ -694,7 +694,7 @@ def test_date_timezone_omitted(self, run_cleanup_mock, timezone): coerced to tz-aware with default timezone """ timestamp = "2021-01-01 00:00:00" - with patch("airflow.settings.TIMEZONE", pendulum.timezone(timezone)): + with patch("airflow.settings._Timezone.initialized_timezone", pendulum.timezone(timezone)): args = self.parser.parse_args(["db", "clean", "--clean-before-timestamp", f"{timestamp}", "-y"]) db_command.cleanup_tables(args) run_cleanup_mock.assert_called_once_with(