Skip to content

Commit

Permalink
Adjust test_download_limit_chat_assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt committed Jan 8, 2025
1 parent 4a41e41 commit a306d64
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions deltachat-rpc-client/tests/test_something.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,15 +610,12 @@ def test_download_limit_chat_assignment(acfactory, tmp_path, n_accounts):
alice_group.send_file(str(path))
snapshot = bob.get_message_by_id(bob.wait_for_incoming_msg_event().msg_id).get_snapshot()
assert snapshot.download_state == DownloadState.AVAILABLE
if n_accounts > 2:
assert snapshot.chat == bob_group
else:
# Group contains only Alice and Bob,
# so partially downloaded messages are
# hard to distinguish from private replies to group messages.
#
# Message may be a private reply, so we assign it to 1:1 chat with Alice.
assert snapshot.chat == bob_chat_alice

# Even with 2 accounts partially downloaded message
# should be correctly assigned to a group
# because it has two contacts (including the sender)
# in the To: field.
assert snapshot.chat == bob_group


def test_markseen_contact_request(acfactory, tmp_path):
Expand Down

0 comments on commit a306d64

Please sign in to comment.