amoghrajesh commented on code in PR #55259:
URL: https://github.com/apache/airflow/pull/55259#discussion_r2322397635


##########
shared/secrets_masker/tests/secrets_masker/test_secrets_masker.py:
##########
@@ -243,10 +253,15 @@ def test_masking_in_explicit_context_exceptions(self, 
logger, caplog):
         ],
     )
     def test_mask_secret(self, name, value, expected_mask):
-        filt = SecretsMasker()
-        filt.add_mask(value, name)
+        from airflow_shared.secrets_masker.secrets_masker import 
_secrets_masker
+        filt = _secrets_masker()
+        configure_secrets_masker_for_test(filt)
 
-        assert filt.patterns == expected_mask
+        try:
+            filt.add_mask(value, name)
+            assert filt.patterns == expected_mask
+        finally:
+            reset_secrets_masker()

Review Comment:
   @ashb the problem is that several module level functions like: 
`should_hide_value_for_key`  depend on the global singleton function



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