test: verify real kbqa workflow
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
from kbqa.chat.sse import encode_event, encode_ping
|
||||
|
||||
|
||||
def test_sse_encodes_single_line_utf8_json() -> None:
|
||||
assert encode_event("token", {"content": "知识"}) == (
|
||||
'event: token\ndata: {"content":"知识"}\n\n'.encode()
|
||||
)
|
||||
assert encode_ping() == b": ping\n\n"
|
||||
Reference in New Issue
Block a user