MCPcopy Create free account
hub / github.com/chatmail/core / test_resend_message

Function test_resend_message

python/tests/test_1_online.py:294–317  ·  view source on GitHub ↗
(acfactory, lp)

Source from the content-addressed store, hash-verified

292
293
294def test_resend_message(acfactory, lp):
295 ac1, ac2 = acfactory.get_online_accounts(2)
296 chat1 = acfactory.get_accepted_chat(ac1, ac2)
297
298 lp.sec("ac1: send message to ac2")
299 chat1.send_text("message")
300
301 lp.sec("ac2: receive message")
302 msg_in = ac2._evtracker.wait_next_incoming_message()
303 assert msg_in.text == "message"
304
305 lp.sec("ac1: resend message")
306 ac1.resend_messages([msg_in])
307
308 lp.sec("ac1: send another message")
309 chat1.send_text("another message")
310
311 lp.sec("ac2: receive another message")
312 msg_in = ac2._evtracker.wait_next_incoming_message()
313 assert msg_in.text == "another message"
314 chat2 = msg_in.chat
315 chat2_msg_cnt = len(chat2.get_messages())
316
317 assert len(chat2.get_messages()) == chat2_msg_cnt
318
319
320def test_long_group_name(acfactory, lp):

Callers

nothing calls this directly

Calls 7

secMethod · 0.80
get_online_accountsMethod · 0.45
get_accepted_chatMethod · 0.45
send_textMethod · 0.45
resend_messagesMethod · 0.45
get_messagesMethod · 0.45

Tested by

no test coverage detected