test(analytics): overview channel 非法值 422 断言补齐
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -84,6 +84,11 @@ async def test_overview_endpoint(make_client, monkeypatch):
|
|||||||
"/api/analytics/overview", params={"channel": "wechat", "scope": "year"}
|
"/api/analytics/overview", params={"channel": "wechat", "scope": "year"}
|
||||||
)
|
)
|
||||||
assert r2.status_code == 422
|
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):
|
async def test_overview_unmapped_accounts(make_client, monkeypatch):
|
||||||
|
|||||||
Reference in New Issue
Block a user