Merge pull request #444 from dod-ccpo/paginate-audit-log

Paginate audit log
This commit is contained in:
richard-dds
2018-11-19 10:58:07 -05:00
committed by GitHub
8 changed files with 133 additions and 6 deletions

View File

@@ -22,3 +22,12 @@ def test_non_admin_cannot_view_audit_log(developer):
def test_ccpo_can_iview_audit_log(ccpo):
AuditLog.get_all_events(ccpo)
def test_paginate_audit_log(ccpo):
user = UserFactory.create()
for _ in range(100):
AuditLog.log_system_event(user, action="create")
events = AuditLog.get_all_events(ccpo, pagination_opts={"per_page": 25, "page": 2})
assert len(events) == 25