Files
kite/backend/tests/test_audit.py
T
curo1305 c8a0443ad2 feat(04-01): add Wave 0 xfail stubs for DOC-02, ADMIN-06, SEC-08, SEC-09
- test_documents.py: append 4 stubs (content_stream 200, 206, admin_403, no_presigned_url)
- test_audit.py: create new file with 4 stubs (viewer, no_doc_content, user_403, export_csv)
- test_security.py: create new file with 2 stubs (credentials_enc_not_in_response, delete_user_cleans_files)
- All stubs: xfail(strict=False), body is pytest.xfail("not implemented yet")
2026-05-25 18:25:18 +02:00

44 lines
1.4 KiB
Python

"""
Audit log API tests — Wave 0 xfail stubs for Phase 4.
All tests in this file are xfail stubs. They will be implemented in Plan 04-07.
The stubs ensure pytest collects them and keeps CI green before implementation
code exists.
Requirement: ADMIN-06 — admin audit log viewer, no doc content, export CSV.
"""
from __future__ import annotations
import os
import pytest
# ---------------------------------------------------------------------------
# ADMIN-06: Audit log viewer
# ---------------------------------------------------------------------------
@pytest.mark.xfail(strict=False)
async def test_audit_log_viewer(async_client, admin_user):
"""GET /api/admin/audit-log returns paginated entries."""
pytest.xfail("not implemented yet")
@pytest.mark.xfail(strict=False)
async def test_audit_log_no_doc_content(async_client, admin_user):
"""Audit log entries contain no 'filename' or 'extracted_text' keys in metadata."""
pytest.xfail("not implemented yet")
@pytest.mark.xfail(strict=False)
async def test_audit_log_regular_user_403(async_client, auth_user):
"""GET /api/admin/audit-log with regular user token returns 403."""
pytest.xfail("not implemented yet")
@pytest.mark.xfail(strict=False)
async def test_audit_log_export_csv(async_client, admin_user):
"""GET /api/admin/audit-log/export?format=csv returns CSV content-type."""
pytest.xfail("not implemented yet")