1313 default_policy , policy_from_name , redact_png_bytes ,
1414)
1515from je_auto_control .utils .redaction .policies import (
16- DETECTOR_CREDIT_CARD , DETECTOR_EMAIL , DETECTOR_PASSWORD_FIELD ,
16+ DETECTOR_CREDIT_CARD , DETECTOR_EMAIL , DETECTOR_SECURE_FIELD ,
1717)
1818from je_auto_control .utils .redaction .rules import (
1919 merge_boxes , build_detector_chain , regex_detector ,
20- password_field_detector ,
20+ secure_field_detector ,
2121)
2222
2323
@@ -63,8 +63,8 @@ def test_credit_card_regex_detector_handles_spaces():
6363 assert boxes == [(0 , 0 , 300 , 30 )]
6464
6565
66- def test_password_field_detector_uses_accessibility_tree ():
67- detector = password_field_detector ()
66+ def test_secure_field_detector_uses_accessibility_tree ():
67+ detector = secure_field_detector ()
6868 boxes = detector (None , {
6969 "accessibility" : [
7070 {"is_password" : True , "bbox" : [5 , 5 , 100 , 25 ]},
@@ -74,8 +74,8 @@ def test_password_field_detector_uses_accessibility_tree():
7474 assert boxes == [(5 , 5 , 100 , 25 )]
7575
7676
77- def test_password_field_detector_skips_missing_bbox ():
78- detector = password_field_detector ()
77+ def test_secure_field_detector_skips_missing_bbox ():
78+ detector = secure_field_detector ()
7979 boxes = detector (None , {
8080 "accessibility" : [{"is_password" : True }],
8181 })
@@ -112,9 +112,9 @@ def test_engine_returns_original_when_no_matches():
112112 assert result .boxes == ()
113113
114114
115- def test_engine_blurs_password_field_bbox ():
115+ def test_engine_blurs_secure_field_bbox ():
116116 engine = RedactionEngine (RedactionPolicy (
117- detectors = (DETECTOR_PASSWORD_FIELD ,),
117+ detectors = (DETECTOR_SECURE_FIELD ,),
118118 blur_radius = 10 ,
119119 ))
120120 image = _solid_image ()
0 commit comments