Skip to content

Commit 43aead6

Browse files
committed
remove test test_download_limit_chat_assignment
1 parent a8f2fb0 commit 43aead6

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

deltachat-rpc-client/tests/test_something.py

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -618,50 +618,6 @@ def test_reactions_for_a_reordering_move(acfactory, direct_imap):
618618
assert list(reactions.reactions_by_contact.values())[0] == [react_str]
619619

620620

621-
@pytest.mark.parametrize("n_accounts", [3, 2])
622-
def test_download_limit_chat_assignment(acfactory, tmp_path, n_accounts):
623-
download_limit = 300000
624-
625-
alice, *others = acfactory.get_online_accounts(n_accounts)
626-
bob = others[0]
627-
628-
alice_group = alice.create_group("test group")
629-
for account in others:
630-
chat = account.create_chat(alice)
631-
chat.send_text("Hello Alice!")
632-
assert alice.get_message_by_id(alice.wait_for_incoming_msg_event().msg_id).get_snapshot().text == "Hello Alice!"
633-
634-
contact = alice.create_contact(account)
635-
alice_group.add_contact(contact)
636-
637-
if n_accounts == 2:
638-
bob_chat_alice = bob.create_chat(alice)
639-
bob.set_config("download_limit", str(download_limit))
640-
641-
alice_group.send_text("hi")
642-
snapshot = bob.get_message_by_id(bob.wait_for_incoming_msg_event().msg_id).get_snapshot()
643-
assert snapshot.text == "hi"
644-
bob_group = snapshot.chat
645-
646-
path = tmp_path / "large"
647-
path.write_bytes(os.urandom(download_limit + 1))
648-
649-
for i in range(10):
650-
logging.info("Sending message %s", i)
651-
alice_group.send_file(str(path))
652-
snapshot = bob.get_message_by_id(bob.wait_for_incoming_msg_event().msg_id).get_snapshot()
653-
assert snapshot.download_state == DownloadState.AVAILABLE
654-
if n_accounts > 2:
655-
assert snapshot.chat == bob_group
656-
else:
657-
# Group contains only Alice and Bob,
658-
# so partially downloaded messages are
659-
# hard to distinguish from private replies to group messages.
660-
#
661-
# Message may be a private reply, so we assign it to 1:1 chat with Alice.
662-
assert snapshot.chat == bob_chat_alice
663-
664-
665621
def test_markseen_contact_request(acfactory):
666622
"""
667623
Test that seen status is synchronized for contact request messages

0 commit comments

Comments
 (0)