enroll/tests/test_ignore.py
Miguel Jacq e4be7f5975
All checks were successful
CI / test (push) Successful in 5m35s
Lint / test (push) Successful in 27s
Trivy / test (push) Successful in 17s
Rename secrets to ignore as it does more than secrets
2025-12-15 17:03:28 +11:00

9 lines
352 B
Python

from enroll.ignore import IgnorePolicy
def test_ignore_policy_denies_common_backup_files():
pol = IgnorePolicy()
assert pol.deny_reason("/etc/shadow-") == "denied_path"
assert pol.deny_reason("/etc/passwd-") == "denied_path"
assert pol.deny_reason("/etc/group-") == "denied_path"
assert pol.deny_reason("/foobar") == "unreadable"