-
Notifications
You must be signed in to change notification settings - Fork 4
AuditLog: add entry_count property #6
Copy link
Copy link
Open
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
The only way to check how many entries have been recorded is len(audit.entries), which copies the internal list unnecessarily.
Expected behavior:
audit = AuditLog()
audit.record(result)
assert audit.entry_count == 1
What needs to change:
Add an entry_count property to AuditLog in gateframe/audit/log.py that returns len(self._entries) directly.
A test in tests/audit/test_log.py should verify the count increments correctly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed