File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
deltachat-rpc-client/tests Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -140,12 +140,9 @@ def test_chat(acfactory) -> None:
140
140
alice_chat_bob = alice_contact_bob .create_chat ()
141
141
alice_chat_bob .send_text ("Hello!" )
142
142
143
- while True :
144
- event = bob .wait_for_event ()
145
- if event .kind == EventType .INCOMING_MSG :
146
- chat_id = event .chat_id
147
- msg_id = event .msg_id
148
- break
143
+ event = bob .wait_for_incoming_msg_event ()
144
+ chat_id = event .chat_id
145
+ msg_id = event .msg_id
149
146
message = bob .get_message_by_id (msg_id )
150
147
snapshot = message .get_snapshot ()
151
148
assert snapshot .chat_id == chat_id
@@ -224,12 +221,9 @@ def test_message(acfactory) -> None:
224
221
alice_chat_bob = alice_contact_bob .create_chat ()
225
222
alice_chat_bob .send_text ("Hello!" )
226
223
227
- while True :
228
- event = bob .wait_for_event ()
229
- if event .kind == EventType .INCOMING_MSG :
230
- chat_id = event .chat_id
231
- msg_id = event .msg_id
232
- break
224
+ event = bob .wait_for_incoming_msg_event ()
225
+ chat_id = event .chat_id
226
+ msg_id = event .msg_id
233
227
234
228
message = bob .get_message_by_id (msg_id )
235
229
snapshot = message .get_snapshot ()
You can’t perform that action at this time.
0 commit comments