Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

TestOnlineAccount::test_forward_messages compares message IDs across accounts #583

Open
VP- opened this issue Feb 22, 2019 · 0 comments
Open

Comments

@VP-
Copy link
Contributor

VP- commented Feb 22, 2019

The test test_forward_messages (any maybe others) sends a message between two accounts, and then compares the resulting message IDs. This only succeeds because the accounts are re-configured each time, none of the existing mails are automatically imported, and each of the compared mails is the first mail in its account. As soon as there is an unequal number of existing messages, the test fails.

  • Steps to reproduce: send a message on one of the accounts before the rest of the test.
--- a/python/tests/test_account.py
+++ b/python/tests/test_account.py
@@ -209,6 +209,7 @@ class TestOnlineAccount:
         wait_successful_IMAP_SMTP_connection(ac2)
         wait_configuration_progress(ac2, 1000)
 
+        ac1.create_chat_by_contact(ac1.get_self_contact()).send_text("message0")
         msg_out = chat.send_text("message2")
 
         # wait for other account to receive
  • Expected behavior: The test still succeeds.

  • Actual behavior: The test fails with:

        # wait for other account to receive
        ev = ac2._evlogger.get_matching("DC_EVENT_INCOMING_MSG|DC_EVENT_MSGS_CHANGED")
>       assert ev[2] == msg_out.id
E       AssertionError: assert 10 == 11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant