@@ -63,56 +63,6 @@ def test_group_many_members_add_leave_remove(self, acfactory, lp):
6363 # Message should be encrypted because keys of other members are gossiped
6464 assert msg .is_encrypted ()
6565
66- def test_synchronize_member_list_on_group_rejoin (self , acfactory , lp ):
67- """
68- Test that user recreates group member list when it joins the group again.
69- ac1 creates a group with two other accounts: ac2 and ac3
70- Then it removes ac2, removes ac3 and adds ac2 back.
71- ac2 did not see that ac3 is removed, so it should rebuild member list from scratch.
72- """
73- lp .sec ("setting up accounts, accepted with each other" )
74- accounts = acfactory .get_online_accounts (3 )
75- acfactory .introduce_each_other (accounts )
76- ac1 , ac2 , ac3 = accounts
77-
78- lp .sec ("ac1: creating group chat with 2 other members" )
79- chat = ac1 .create_group_chat ("title1" , contacts = [ac2 , ac3 ])
80- assert not chat .is_promoted ()
81-
82- lp .sec ("ac1: send message to new group chat" )
83- msg = chat .send_text ("hello" )
84- assert chat .is_promoted () and msg .is_encrypted ()
85-
86- assert chat .num_contacts () == 3
87-
88- lp .sec ("checking that the chat arrived correctly" )
89- for ac in accounts [1 :]:
90- msg = ac ._evtracker .wait_next_incoming_message ()
91- assert msg .text == "hello"
92- print ("chat is" , msg .chat )
93- assert msg .chat .num_contacts () == 3
94-
95- lp .sec ("ac1: removing ac2" )
96- chat .remove_contact (ac2 )
97-
98- lp .sec ("ac2: wait for a message about removal from the chat" )
99- msg = ac2 ._evtracker .wait_next_incoming_message ()
100-
101- lp .sec ("ac1: removing ac3" )
102- chat .remove_contact (ac3 )
103-
104- lp .sec ("ac1: adding ac2 back" )
105- # Group is promoted, message is sent automatically
106- assert chat .is_promoted ()
107- chat .add_contact (ac2 )
108-
109- lp .sec ("ac2: check that ac3 is removed" )
110- msg = ac2 ._evtracker .wait_next_incoming_message ()
111-
112- assert chat .num_contacts () == 2
113- assert msg .chat .num_contacts () == 2
114- acfactory .dump_imap_summary (sys .stdout )
115-
11666
11767def test_qr_verified_group_and_chatting (acfactory , lp ):
11868 ac1 , ac2 , ac3 = acfactory .get_online_accounts (3 )
0 commit comments