Skip to content

Commit 165e283

Browse files
committed
Adjust test_download_limit_chat_assignment
1 parent 4a41e41 commit 165e283

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

deltachat-rpc-client/tests/test_something.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,6 @@ def test_download_limit_chat_assignment(acfactory, tmp_path, n_accounts):
593593

594594
alice_group.add_contact(contact)
595595

596-
if n_accounts == 2:
597-
bob_chat_alice = bob.create_chat(alice)
598596
bob.set_config("download_limit", str(download_limit))
599597

600598
alice_group.send_text("hi")
@@ -610,15 +608,12 @@ def test_download_limit_chat_assignment(acfactory, tmp_path, n_accounts):
610608
alice_group.send_file(str(path))
611609
snapshot = bob.get_message_by_id(bob.wait_for_incoming_msg_event().msg_id).get_snapshot()
612610
assert snapshot.download_state == DownloadState.AVAILABLE
613-
if n_accounts > 2:
614-
assert snapshot.chat == bob_group
615-
else:
616-
# Group contains only Alice and Bob,
617-
# so partially downloaded messages are
618-
# hard to distinguish from private replies to group messages.
619-
#
620-
# Message may be a private reply, so we assign it to 1:1 chat with Alice.
621-
assert snapshot.chat == bob_chat_alice
611+
612+
# Even with 2 accounts partially downloaded message
613+
# should be correctly assigned to a group
614+
# because it has two contacts (including the sender)
615+
# in the To: field.
616+
assert snapshot.chat == bob_group
622617

623618

624619
def test_markseen_contact_request(acfactory, tmp_path):

0 commit comments

Comments
 (0)