mirror of
https://github.com/chatmail/core.git
synced 2026-05-04 05:46:29 +03:00
test: fix flaky test_forward_increation() test
This commit is contained in:
@@ -68,13 +68,16 @@ class TestOnlineInCreation:
|
|||||||
assert prepared_original.is_out_preparing()
|
assert prepared_original.is_out_preparing()
|
||||||
wait_msgs_changed(ac1, [(chat.id, prepared_original.id)])
|
wait_msgs_changed(ac1, [(chat.id, prepared_original.id)])
|
||||||
|
|
||||||
lp.sec("forward the message while still in creation")
|
lp.sec("create a new group")
|
||||||
chat2 = ac1.create_group_chat("newgroup")
|
chat2 = ac1.create_group_chat("newgroup")
|
||||||
|
wait_msgs_changed(ac1, [(0, 0)])
|
||||||
|
|
||||||
|
lp.sec("add a contact to new group")
|
||||||
chat2.add_contact(ac2)
|
chat2.add_contact(ac2)
|
||||||
ac1._evtracker.consume_events()
|
wait_msgs_changed(ac1, [(chat2.id, None)])
|
||||||
|
|
||||||
|
lp.sec("forward the message while still in creation")
|
||||||
ac1.forward_messages([prepared_original], chat2)
|
ac1.forward_messages([prepared_original], chat2)
|
||||||
# XXX there might be two EVENT_MSGS_CHANGED and only one of them
|
|
||||||
# is the one caused by forwarding
|
|
||||||
forwarded_id = wait_msgs_changed(ac1, [(chat2.id, None)])
|
forwarded_id = wait_msgs_changed(ac1, [(chat2.id, None)])
|
||||||
forwarded_msg = ac1.get_message_by_id(forwarded_id)
|
forwarded_msg = ac1.get_message_by_id(forwarded_id)
|
||||||
assert forwarded_msg.is_out_preparing()
|
assert forwarded_msg.is_out_preparing()
|
||||||
|
|||||||
Reference in New Issue
Block a user