| 123456789 |
- import json
- from data_query_agent.feishu import FeishuLongConnection
- def test_parse_text_and_post() -> None:
- assert FeishuLongConnection._parse_content(json.dumps({"text": "hello"}), "text") == "hello"
- post = {"zh_cn": {"title": "标题", "content": [[{"tag": "text", "text": "内容"}]]}}
- assert FeishuLongConnection._parse_content(json.dumps(post, ensure_ascii=False), "post") == "标题\n内容"
|