test(analytics): overview channel 非法值 422 断言补齐

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-04 18:16:44 +08:00
parent b067d690f1
commit 6790710965
+5
View File
@@ -84,6 +84,11 @@ async def test_overview_endpoint(make_client, monkeypatch):
"/api/analytics/overview", params={"channel": "wechat", "scope": "year"}
)
assert r2.status_code == 422
# channel 非法 → 422(同一 Literal 校验路径)
r3 = await client.get(
"/api/analytics/overview", params={"channel": "sms", "scope": "today"}
)
assert r3.status_code == 422
async def test_overview_unmapped_accounts(make_client, monkeypatch):