From 61daf7218dbe0c308398a539286761bdecf203e6 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sun, 9 Feb 2020 01:17:38 +0300 Subject: [PATCH] Preconfigure the key in clone_online_account() This avoids generating the key in test_ac_setup_message --- python/tests/conftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/tests/conftest.py b/python/tests/conftest.py index 9310fb726..1f76e2b4b 100644 --- a/python/tests/conftest.py +++ b/python/tests/conftest.py @@ -243,10 +243,12 @@ def acfactory(pytestconfig, tmpdir, request, session_liveconfig, datadir): wait_configuration_progress(ac2, 1000) return ac1, ac2 - def clone_online_account(self, account): + def clone_online_account(self, account, pre_generated_key=True): self.live_count += 1 tmpdb = tmpdir.join("livedb%d" % self.live_count) ac = self.make_account(tmpdb.strpath, logid="ac{}".format(self.live_count)) + if pre_generated_key: + self._preconfigure_key(ac, account.get_config("addr")) ac._evlogger.init_time = self.init_time ac._evlogger.set_timeout(30) ac.configure(addr=account.get_config("addr"), mail_pw=account.get_config("mail_pw"))