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

Function test_reply_privately

python/tests/test_1_online.py:481–503  ·  view source on GitHub ↗
(acfactory)

Source from the content-addressed store, hash-verified

479
480
481def test_reply_privately(acfactory):
482 ac1, ac2 = acfactory.get_online_accounts(2)
483
484 group1 = ac1.create_group_chat("group")
485 group1.add_contact(ac2)
486 group1.send_text("hello")
487
488 msg2 = ac2._evtracker.wait_next_incoming_message()
489 group2 = msg2.create_chat()
490 assert group2.get_name() == group1.get_name()
491
492 msg_reply = Message.new_empty(ac2, "text")
493 msg_reply.set_text("message reply")
494 msg_reply.quote = msg2
495
496 private_chat1 = ac1.create_chat(ac2)
497 private_chat2 = ac2.create_chat(ac1)
498 private_chat2.send_msg(msg_reply)
499
500 msg_reply1 = ac1._evtracker.wait_next_incoming_message()
501 assert msg_reply1.quoted_text == "hello"
502 assert not msg_reply1.chat.is_group()
503 assert msg_reply1.chat.id == private_chat1.id
504
505
506def test_mdn_asymmetric(acfactory, lp):

Callers

nothing calls this directly

Calls 11

new_emptyMethod · 0.80
is_groupMethod · 0.80
get_online_accountsMethod · 0.45
create_group_chatMethod · 0.45
add_contactMethod · 0.45
send_textMethod · 0.45
create_chatMethod · 0.45
get_nameMethod · 0.45
set_textMethod · 0.45
send_msgMethod · 0.45

Tested by

no test coverage detected