test(06.2-01): add xfail stubs for ADMIN-06 audit enrichment + daily exports (Task 3)
- test_audit_log_includes_user_handle: user_handle and actor_handle in audit items (D-11)
- test_audit_log_filter_by_handle: user_handle query param filters entries (D-12)
- test_audit_log_filter_unknown_handle: unknown handle returns empty list, not 422 (D-12)
- test_daily_exports_list: daily-exports listing endpoint returns {items} (D-15)
- test_daily_export_download: daily export download returns CSV bytes with Content-Disposition (D-16)
This commit is contained in:
@@ -192,3 +192,33 @@ async def test_audit_log_export_csv(async_client, admin_user, db_session):
|
|||||||
assert key not in response.text, (
|
assert key not in response.text, (
|
||||||
f"forbidden field '{key}' found in CSV export body"
|
f"forbidden field '{key}' found in CSV export body"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Phase 6.2 Wave 0 xfail stubs — ADMIN-06 audit enrichment + daily exports
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
async def test_audit_log_includes_user_handle(async_client, admin_user, db_session):
|
||||||
|
"""Audit log items include user_handle and actor_handle strings (D-11)"""
|
||||||
|
pytest.xfail("Phase 6.2 — not implemented yet")
|
||||||
|
|
||||||
|
|
||||||
|
async def test_audit_log_filter_by_handle(async_client, admin_user, db_session):
|
||||||
|
"""GET /api/admin/audit-log?user_handle=X filters to matching entries (D-12)"""
|
||||||
|
pytest.xfail("Phase 6.2 — not implemented yet")
|
||||||
|
|
||||||
|
|
||||||
|
async def test_audit_log_filter_unknown_handle(async_client, admin_user, db_session):
|
||||||
|
"""GET /api/admin/audit-log?user_handle=unknown returns empty items list, not 422 (D-12)"""
|
||||||
|
pytest.xfail("Phase 6.2 — not implemented yet")
|
||||||
|
|
||||||
|
|
||||||
|
async def test_daily_exports_list(async_client, admin_user):
|
||||||
|
"""GET /api/admin/audit-log/daily-exports returns {items: [...]} (D-15)"""
|
||||||
|
pytest.xfail("Phase 6.2 — not implemented yet")
|
||||||
|
|
||||||
|
|
||||||
|
async def test_daily_export_download(async_client, admin_user):
|
||||||
|
"""GET /api/admin/audit-log/daily-exports/{date} returns CSV bytes with Content-Disposition (D-16)"""
|
||||||
|
pytest.xfail("Phase 6.2 — not implemented yet")
|
||||||
|
|||||||
Reference in New Issue
Block a user