Files
bot-bottle/tests/unit
didericis c97c01d300
lint / lint (push) Successful in 1m51s
test / unit (pull_request) Successful in 46s
test / integration (pull_request) Successful in 18s
test(dlp): table-drive token-pattern detector cases
The token-pattern detector had 15 near-identical test methods across
`TestScanTokenPatterns` and `TestScanTokenPatternsExtended`, each
scanning a body carrying one synthetic token and asserting the reason
names the credential type.

Collapse them into a single `_TOKEN_PATTERN_CASES` table driven by
`subTest`, so adding a new token shape is a one-line row. Each case now
also asserts block severity (previously only the AWS case did).
`TestScanTokenPatternsExtended` is removed; its rows live in the table.
The non-matrix cases (clean text, location, context, reason) stay as
explicit methods. No production code change.

Closes #289

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NkwFXLFff9PYPy4wgVBJp9
2026-06-25 19:41:17 -04:00
..
2026-06-25 08:58:28 +00:00