mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
- perform direct_imap init in testplugin instead of global deltachat
plugin, probably also helping to avoid some segfeaults during teardown - some API renaming on the side (too hard to split into separate commit, sorry)
This commit is contained in:
@@ -727,15 +727,12 @@ class TestOnlineAccount:
|
||||
def test_one_account_send_bcc_setting(self, acfactory, lp):
|
||||
ac1 = acfactory.get_online_configuring_account()
|
||||
ac2 = acfactory.get_online_configuring_account()
|
||||
|
||||
# Clone the first account: we will test if sent messages
|
||||
# are copied to it via BCC.
|
||||
ac1_clone = acfactory.clone_online_account(ac1)
|
||||
|
||||
ac1_clone = acfactory.get_cloned_configuring_account(ac1)
|
||||
acfactory.wait_configure_and_start_io()
|
||||
|
||||
chat = acfactory.get_accepted_chat(ac1, ac2)
|
||||
# test if sent messages are copied to it via BCC.
|
||||
|
||||
chat = acfactory.get_accepted_chat(ac1, ac2)
|
||||
self_addr = ac1.get_config("addr")
|
||||
other_addr = ac2.get_config("addr")
|
||||
|
||||
@@ -1094,7 +1091,7 @@ class TestOnlineAccount:
|
||||
"""Test that message marked as seen on one device is marked as seen on another."""
|
||||
ac1 = acfactory.get_online_configuring_account()
|
||||
ac2 = acfactory.get_online_configuring_account()
|
||||
ac1_clone = acfactory.clone_online_account(ac1)
|
||||
ac1_clone = acfactory.get_cloned_configuring_account(ac1)
|
||||
acfactory.wait_configure_and_start_io()
|
||||
|
||||
ac1.set_config("bcc_self", "1")
|
||||
@@ -1535,7 +1532,7 @@ class TestOnlineAccount:
|
||||
def test_no_old_msg_is_fresh(self, acfactory, lp):
|
||||
ac1 = acfactory.get_online_configuring_account()
|
||||
ac2 = acfactory.get_online_configuring_account()
|
||||
ac1_clone = acfactory.clone_online_account(ac1)
|
||||
ac1_clone = acfactory.get_cloned_configuring_account(ac1)
|
||||
acfactory.wait_configure_and_start_io()
|
||||
|
||||
ac1.set_config("e2ee_enabled", "0")
|
||||
@@ -1899,7 +1896,7 @@ class TestOnlineAccount:
|
||||
# before ther setup message is send. DC does not read old messages
|
||||
# as of Jul2019
|
||||
ac1 = acfactory.get_online_configuring_account()
|
||||
ac2 = acfactory.clone_online_account(ac1)
|
||||
ac2 = acfactory.get_cloned_configuring_account(ac1)
|
||||
acfactory.wait_configure_and_start_io()
|
||||
|
||||
lp.sec("trigger ac setup message and return setupcode")
|
||||
@@ -1920,7 +1917,7 @@ class TestOnlineAccount:
|
||||
|
||||
def test_ac_setup_message_twice(self, acfactory, lp):
|
||||
ac1 = acfactory.get_online_configuring_account()
|
||||
ac2 = acfactory.clone_online_account(ac1)
|
||||
ac2 = acfactory.get_cloned_configuring_account(ac1)
|
||||
acfactory.wait_configure_and_start_io()
|
||||
|
||||
lp.sec("trigger ac setup message but ignore")
|
||||
@@ -2404,7 +2401,7 @@ class TestOnlineAccount:
|
||||
lp.sec("ac3 reinstalls DC and generates a new key")
|
||||
ac3.stop_io()
|
||||
acfactory.remove_preconfigured_keys()
|
||||
ac4 = acfactory.clone_online_account(ac3)
|
||||
ac4 = acfactory.get_cloned_configuring_account(ac3)
|
||||
ac4._configtracker.wait_finish()
|
||||
# Create contacts to make sure incoming messages are not treated as contact requests
|
||||
chat41 = ac4.create_chat(ac1)
|
||||
@@ -2810,7 +2807,7 @@ class TestOnlineAccount:
|
||||
assert_folders_configured(ac1)
|
||||
|
||||
lp.sec("create a cloned ac1 and fetch contact history during configure")
|
||||
ac1_clone = acfactory.clone_online_account(ac1)
|
||||
ac1_clone = acfactory.get_cloned_configuring_account(ac1)
|
||||
ac1_clone.set_config("fetch_existing_msgs", "1")
|
||||
ac1_clone._configtracker.wait_finish()
|
||||
ac1_clone.start_io()
|
||||
@@ -2855,7 +2852,7 @@ class TestOnlineAccount:
|
||||
assert ac1.direct_imap.idle_wait_for_seen()
|
||||
|
||||
lp.sec("Clone online account and let it fetch the existing messages")
|
||||
ac1_clone = acfactory.clone_online_account(ac1)
|
||||
ac1_clone = acfactory.get_cloned_configuring_account(ac1)
|
||||
ac1_clone.set_config("fetch_existing_msgs", "1")
|
||||
ac1_clone._configtracker.wait_finish()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user