@@ -57,16 +57,16 @@ def finding_orderer(f):
5757 "Credit Card Number" ,
5858 result [0 ][0 ].detector_uuid ,
5959 Confidence .VERY_LIKELY ,
60- Range (0 , 19 ), Range (0 , 19 ), "" ,
60+ Range (0 , 19 ), Range (0 , 19 ), None , None , "" ,
6161 [], ["Inline Detection Rule #1" ])
6262 assert result [0 ][1 ] == Finding (
6363 "489-36-8350" ,
6464 "[REDACTED]" ,
6565 "d number, " , " ssn" ,
66- "" ,
66+ "US_SOCIAL_SECURITY_NUMBER " ,
6767 result [0 ][1 ].detector_uuid ,
6868 Confidence .VERY_LIKELY ,
69- Range (46 , 57 ), Range (46 , 57 ), "" ,
69+ Range (46 , 57 ), Range (46 , 57 ), None , None , "" ,
7070 [], ["Inline Detection Rule #1" ])
7171 assert len (redactions ) == 1
7272 assert redactions [0 ] == "491👀-👀👀👀👀-👀👀👀👀-👀👀👀👀 is my credit card number, [REDACTED] ssn"
@@ -120,7 +120,9 @@ def test_scan_text():
120120 {
121121 "start" : 0 ,
122122 "end" : 19
123- }
123+ },
124+ "rowRange" : None ,
125+ "columnRange" : None ,
124126 },
125127 "redactedLocation" :
126128 {
@@ -133,7 +135,9 @@ def test_scan_text():
133135 {
134136 "start" : 0 ,
135137 "end" : 19
136- }
138+ },
139+ "rowRange" : None ,
140+ "columnRange" : None ,
137141 },
138142 "matchedDetectionRuleUUIDs" :
139143 [],
@@ -164,7 +168,17 @@ def test_scan_text():
164168 {
165169 "start" : 46 ,
166170 "end" : 57
167- }
171+ },
172+ "rowRange" :
173+ {
174+ "start" : 2 ,
175+ "end" : 4 ,
176+ },
177+ "columnRange" :
178+ {
179+ "start" : 1 ,
180+ "end" : 1 ,
181+ },
168182 },
169183 "redactedLocation" :
170184 {
@@ -177,7 +191,9 @@ def test_scan_text():
177191 {
178192 "start" : 46 ,
179193 "end" : 56
180- }
194+ },
195+ "rowRange" : None ,
196+ "columnRange" : None ,
181197 },
182198 "matchedDetectionRuleUUIDs" :
183199 [],
@@ -318,7 +334,7 @@ def test_scan_text():
318334 "Credit Card Number" ,
319335 result [0 ][0 ].detector_uuid ,
320336 Confidence .VERY_LIKELY ,
321- Range (0 , 19 ), Range (0 , 19 ), "" ,
337+ Range (0 , 19 ), Range (0 , 19 ), None , None , "" ,
322338 [], ["Inline Detection Rule #1" ])
323339 assert result [0 ][1 ] == Finding (
324340 "489-36-8350" ,
@@ -327,7 +343,7 @@ def test_scan_text():
327343 "" ,
328344 result [0 ][1 ].detector_uuid ,
329345 Confidence .VERY_LIKELY ,
330- Range (46 , 57 ), Range (46 , 57 ), "" ,
346+ Range (46 , 57 ), Range (46 , 57 ), Range ( 2 , 4 ), Range ( 1 , 1 ), "" ,
331347 [], ["Inline Detection Rule #1" ])
332348 assert len (redactions ) == 1
333349 assert redactions [0 ] == "491👀-👀👀👀👀-👀👀👀👀-👀👀👀👀 is my credit card number, [REDACTED] ssn"
@@ -361,7 +377,9 @@ def test_scan_text_with_policy_uuids():
361377 {
362378 "start" : 0 ,
363379 "end" : 19
364- }
380+ },
381+ "rowRange" : None ,
382+ "columnRange" : None ,
365383 },
366384 "redactedLocation" :
367385 {
@@ -374,7 +392,9 @@ def test_scan_text_with_policy_uuids():
374392 {
375393 "start" : 0 ,
376394 "end" : 19
377- }
395+ },
396+ "rowRange" : None ,
397+ "columnRange" : None ,
378398 },
379399 "matchedDetectionRuleUUIDs" :
380400 ["0d8efd7b-b87a-478b-984e-9cf5534a46bc" ],
@@ -412,7 +432,7 @@ def test_scan_text_with_policy_uuids():
412432 "Credit Card Number" ,
413433 result [0 ][0 ].detector_uuid ,
414434 Confidence .VERY_LIKELY ,
415- Range (0 , 19 ), Range (0 , 19 ), "" ,
435+ Range (0 , 19 ), Range (0 , 19 ), None , None , "" ,
416436 ["0d8efd7b-b87a-478b-984e-9cf5534a46bc" ], [])
417437 assert len (redactions ) == 1
418438 assert redactions [0 ] == "491👀-👀👀👀👀-👀👀👀👀-👀👀👀👀 is my credit card number, [REDACTED] ssn"
0 commit comments