This commit is contained in:
@@ -324,3 +324,14 @@ async def test_stale_token_marks_channel_expired(
|
||||
assert channels["items"][0]["status"] == "expired"
|
||||
assert channels["items"][0]["connected"] is False
|
||||
assert "重新扫码" in channels["items"][0]["last_error"]
|
||||
|
||||
|
||||
async def test_upstream_wait_status_is_normalized(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
"""上游说 "wait",页面只认 waiting——这一层要对齐,否则界面停在"等扫码结果…"。"""
|
||||
|
||||
async def fake_post(path: str, body: dict, **kwargs: Any) -> dict: # noqa: ARG001
|
||||
return {"status": "wait"}
|
||||
|
||||
monkeypatch.setattr(wechat_ilink, "_post", fake_post)
|
||||
result = await wechat_ilink.qrcode_status("qr-x")
|
||||
assert result.status == "waiting"
|
||||
|
||||
Reference in New Issue
Block a user