Skip to content

Commit 976908c

Browse files
GeneAIclaude
authored andcommitted
fix: Fix AuditEvent import bug in delete_pattern + add 90%+ test coverage
- Fixed bug in secure_memdocs.py line 1136 where delete_pattern incorrectly referenced self.audit_logger.AuditEvent instead of imported AuditEvent class - Added test_secure_memdocs_extended.py with 47 tests covering encryption, error handling, classification edge cases, and delete functionality - Added test_audit_logger_extended.py with 37 tests covering log rotation, date range queries, custom filters, and compliance reporting - Total test coverage now 90.08% (1,840 tests passing) Key coverage improvements: - secure_memdocs.py: 96.12% - audit_logger.py: 95.29% - secrets_detector.py: 94.98% - pii_scrubber.py: 97.84% 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 8001aa1 commit 976908c

File tree

3 files changed

+1846
-2
lines changed

3 files changed

+1846
-2
lines changed

empathy_llm_toolkit/security/secure_memdocs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
import structlog
4343

44-
from .audit_logger import AuditLogger
44+
from .audit_logger import AuditEvent, AuditLogger
4545
from .pii_scrubber import PIIScrubber
4646
from .secrets_detector import SecretsDetector
4747

@@ -1133,7 +1133,7 @@ def delete_pattern(self, pattern_id: str, user_id: str, session_id: str = "") ->
11331133
if deleted:
11341134
# Log deletion
11351135
self.audit_logger._write_event(
1136-
self.audit_logger.AuditEvent(
1136+
AuditEvent(
11371137
event_type="delete_pattern",
11381138
user_id=user_id,
11391139
session_id=session_id,

0 commit comments

Comments
 (0)