MCPcopy Index your code
hub / github.com/offu/WeRoBot / test_text_message

Function test_text_message

tests/test_parser.py:10–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9
10def test_text_message():
11 message = parse_user_msg(
12 """
13 <xml>
14 <ToUserName><![CDATA[toUser]]></ToUserName>
15 <FromUserName><![CDATA[fromUser]]></FromUserName>
16 <CreateTime>1348831860</CreateTime>
17 <MsgType><![CDATA[text]]></MsgType>
18 <Content><![CDATA[this is a test]]></Content>
19 <MsgId>1234567890123456</MsgId>
20 </xml>
21 """
22 )
23 assert message.target == "toUser"
24 assert message.source == "fromUser"
25 assert message.time == 1348831860
26 assert message.type == "text"
27 assert message.content == "this is a test"
28 assert message.message_id == 1234567890123456
29
30
31def test_image_message():

Callers

nothing calls this directly

Calls 1

parse_user_msgFunction · 0.90

Tested by

no test coverage detected