Files
FusionAGI/tests/test_audit_export.py

23 lines
629 B
Python
Raw Permalink Normal View History

"""Tests for audit log export functionality."""
from fusionagi.api.routes.audit_export import _get_audit_records
def test_get_audit_records_empty():
"""Should return empty list when no tracer is available."""
records = _get_audit_records()
assert isinstance(records, list)
def test_get_audit_records_with_limit():
"""Should respect limit parameter."""
records = _get_audit_records(limit=5)
assert len(records) <= 5
def test_get_audit_records_with_since():
"""Should filter by timestamp."""
import time
records = _get_audit_records(since=time.time() + 1000)
assert len(records) == 0