diff --git a/python/tests/conftest.py b/python/tests/conftest.py index 8ce4ebdfb..0523055e2 100644 --- a/python/tests/conftest.py +++ b/python/tests/conftest.py @@ -150,6 +150,11 @@ def acfactory(pytestconfig, tmpdir, request, session_liveconfig): lib.dc_set_config(ac._dc_context, b"configured", b"1") return ac + def peek_online_config(self): + if not session_liveconfig: + pytest.skip("specify DCC_PY_LIVECONFIG or --liveconfig") + return session_liveconfig.get(self.live_count) + def get_online_config(self): if not session_liveconfig: pytest.skip("specify DCC_PY_LIVECONFIG or --liveconfig") diff --git a/python/tests/test_account.py b/python/tests/test_account.py index 79c7871bb..7130befb6 100644 --- a/python/tests/test_account.py +++ b/python/tests/test_account.py @@ -389,7 +389,8 @@ class TestOnlineAccount: def test_one_account_send_bcc_setting(self, acfactory, lp): ac1 = acfactory.get_online_configuring_account() - c2 = ac1.create_contact(email="notexists@testrun.org") + ac2_config = acfactory.peek_online_config() + c2 = ac1.create_contact(email=ac2_config["addr"]) chat = ac1.create_chat_by_contact(c2) assert chat.id > const.DC_CHAT_ID_LAST_SPECIAL wait_successful_IMAP_SMTP_connection(ac1)