Skip to content

Commit a8f2fb0

Browse files
committed
remove test test_receive_imf_failure
1 parent 62331b0 commit a8f2fb0

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

deltachat-rpc-client/tests/test_something.py

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -331,52 +331,6 @@ def test_message(acfactory) -> None:
331331
assert reactions == snapshot.reactions
332332

333333

334-
def test_receive_imf_failure(acfactory) -> None:
335-
alice, bob = acfactory.get_online_accounts(2)
336-
alice_contact_bob = alice.create_contact(bob, "Bob")
337-
alice_chat_bob = alice_contact_bob.create_chat()
338-
339-
bob.set_config("fail_on_receiving_full_msg", "1")
340-
alice_chat_bob.send_text("Hello!")
341-
event = bob.wait_for_incoming_msg_event()
342-
chat_id = event.chat_id
343-
msg_id = event.msg_id
344-
message = bob.get_message_by_id(msg_id)
345-
snapshot = message.get_snapshot()
346-
assert snapshot.chat_id == chat_id
347-
assert snapshot.download_state == DownloadState.AVAILABLE
348-
assert snapshot.error is not None
349-
assert snapshot.show_padlock
350-
351-
# The failed message doesn't break the IMAP loop.
352-
bob.set_config("fail_on_receiving_full_msg", "0")
353-
alice_chat_bob.send_text("Hello again!")
354-
event = bob.wait_for_incoming_msg_event()
355-
assert event.chat_id == chat_id
356-
msg_id = event.msg_id
357-
message1 = bob.get_message_by_id(msg_id)
358-
snapshot = message1.get_snapshot()
359-
assert snapshot.chat_id == chat_id
360-
assert snapshot.download_state == DownloadState.DONE
361-
assert snapshot.error is None
362-
363-
# The failed message can be re-downloaded later.
364-
bob._rpc.download_full_message(bob.id, message.id)
365-
event = bob.wait_for_event(EventType.MSGS_CHANGED)
366-
message = bob.get_message_by_id(event.msg_id)
367-
snapshot = message.get_snapshot()
368-
assert snapshot.download_state == DownloadState.IN_PROGRESS
369-
event = bob.wait_for_event(EventType.MSGS_CHANGED)
370-
assert event.chat_id == chat_id
371-
msg_id = event.msg_id
372-
message = bob.get_message_by_id(msg_id)
373-
snapshot = message.get_snapshot()
374-
assert snapshot.chat_id == chat_id
375-
assert snapshot.download_state == DownloadState.DONE
376-
assert snapshot.error is None
377-
assert snapshot.text == "Hello!"
378-
379-
380334
def test_selfavatar_sync(acfactory, data, log) -> None:
381335
alice = acfactory.get_online_account()
382336

0 commit comments

Comments
 (0)