feat(send): async acceptance and send_result event
This commit is contained in:
@@ -40,10 +40,11 @@ def test_send_after_login():
|
||||
r = client.post("/v1/wechat-personal/send/text", json={
|
||||
"account_id": "bot-002",
|
||||
"conversation_id": "room-001",
|
||||
"text": "hello"
|
||||
"text": "hello",
|
||||
"record_id": "rec-001",
|
||||
})
|
||||
assert r.status_code == 200
|
||||
assert r.json()["success"] is True
|
||||
assert r.json()["accepted"] is True
|
||||
assert r.json()["message_id"]
|
||||
|
||||
|
||||
@@ -51,10 +52,11 @@ def test_send_without_login_fails():
|
||||
r = client.post("/v1/wechat-personal/send/text", json={
|
||||
"account_id": "bot-offline",
|
||||
"conversation_id": "room-001",
|
||||
"text": "hello"
|
||||
"text": "hello",
|
||||
"record_id": "rec-offline",
|
||||
})
|
||||
assert r.status_code == 200
|
||||
assert r.json()["success"] is False
|
||||
assert r.json()["accepted"] is False
|
||||
|
||||
|
||||
def test_heartbeat_and_monitor():
|
||||
|
||||
Reference in New Issue
Block a user