12
12
13
13
from deltachat_rpc_client import Contact , EventType , Message , events
14
14
from deltachat_rpc_client .const import DownloadState , MessageState
15
- from deltachat_rpc_client .direct_imap import DirectImap
16
15
from deltachat_rpc_client .rpc import JsonRpcError
17
16
18
17
@@ -536,7 +535,7 @@ def test_reaction_to_partially_fetched_msg(acfactory, tmp_path):
536
535
assert list (reactions .reactions_by_contact .values ())[0 ] == [react_str ]
537
536
538
537
539
- def test_reactions_for_a_reordering_move (acfactory ):
538
+ def test_reactions_for_a_reordering_move (acfactory , direct_imap ):
540
539
"""When a batch of messages is moved from Inbox to DeltaChat folder with a single MOVE command,
541
540
their UIDs may be reordered (e.g. Gmail is known for that) which led to that messages were
542
541
processed by receive_imf in the wrong order, and, particularly, reactions were processed before
@@ -560,7 +559,7 @@ def test_reactions_for_a_reordering_move(acfactory):
560
559
msg1 .send_reaction (react_str ).wait_until_delivered ()
561
560
562
561
logging .info ("moving messages to ac2's DeltaChat folder in the reverse order" )
563
- ac2_direct_imap = DirectImap (ac2 )
562
+ ac2_direct_imap = direct_imap (ac2 )
564
563
ac2_direct_imap .connect ()
565
564
for uid in sorted ([m .uid for m in ac2_direct_imap .get_all_messages ()], reverse = True ):
566
565
ac2_direct_imap .conn .move (uid , "DeltaChat" )
0 commit comments