Skip to content

Commit

Permalink
missed a file
Browse files Browse the repository at this point in the history
  • Loading branch information
amoghrajesh committed Feb 4, 2025
1 parent dde6603 commit 8735fed
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests_common/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import pytest
import time_machine

from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS

if TYPE_CHECKING:
from itsdangerous import URLSafeSerializer
from sqlalchemy.orm import Session
Expand Down Expand Up @@ -1549,7 +1551,12 @@ def _disable_redact(request: pytest.FixtureRequest, mocker):
yield
return

mocked_redact = mocker.patch("airflow.sdk.execution_time.secrets_masker.SecretsMasker.redact")
target = (
"airflow.sdk.execution_time.secrets_masker.redact"
if AIRFLOW_V_3_0_PLUS
else "airflow.utils.log.secrets_masker.mask_secret.redact"
)
mocked_redact = mocker.patch(target)
mocked_redact.side_effect = lambda item, name=None, max_depth=None: item
with pytest.MonkeyPatch.context() as mp_ctx:
mp_ctx.setattr(settings, "MASK_SECRETS_IN_LOGS", False)
Expand Down

0 comments on commit 8735fed

Please sign in to comment.