| 123456789101112131415161718192021222324252627282930313233343536373839 |
- """§12 统一工作台"""
- import pytest
- pytestmark = pytest.mark.integration
- def test_workbench_and_notifications(api):
- home = api.assert_success(api.get("/workbench", params={"role": "manager"}))
- assert isinstance(home, dict)
- notifs = api.assert_success(api.get("/notifications"))
- assert isinstance(notifs, list)
- tpl = api.assert_success(
- api.get(
- "/notifications/template",
- params={"issueType": "missing_doc", "roomName": "测试群"},
- )
- )
- assert isinstance(tpl, dict)
- sent = api.assert_success(
- api.post(
- "/notifications/send",
- json={
- "type": "compliance",
- "receiverId": 1,
- "title": "pytest 通知",
- "content": "测试内容",
- "refId": 1,
- },
- ),
- status=201,
- )
- assert sent is not None
- logs = api.assert_success(api.get("/audit-logs", params={"limit": 20}))
- assert isinstance(logs, list)
|