diff --git a/python/tests/conftest.py b/python/tests/conftest.py index 87b959001..14295fbeb 100644 --- a/python/tests/conftest.py +++ b/python/tests/conftest.py @@ -279,11 +279,11 @@ def lp(): return Printer() -def wait_configuration_progress(account, min_target, max_target=1001): +def wait_configuration_progress(account, min_target, max_target=1001, check_error=True): min_target = min(min_target, max_target) while 1: evt_name, data1, data2 = \ - account._evlogger.get_matching("DC_EVENT_CONFIGURE_PROGRESS") + account._evlogger.get_matching("DC_EVENT_CONFIGURE_PROGRESS", check_error=check_error) if data1 >= min_target and data1 <= max_target: print("** CONFIG PROGRESS {}".format(min_target), account) break diff --git a/python/tests/test_account.py b/python/tests/test_account.py index b437afef0..54d6a890a 100644 --- a/python/tests/test_account.py +++ b/python/tests/test_account.py @@ -1465,22 +1465,22 @@ class TestOnlineConfigureFails: ac1, configdict = acfactory.get_online_config() ac1.configure(addr=configdict["addr"], mail_pw="123") wait_configuration_progress(ac1, 500) - ev1 = ac1._evlogger.get_matching("DC_EVENT_ERROR_NETWORK") + ev1 = ac1._evlogger.get_matching("DC_EVENT_ERROR_NETWORK", check_error=False) assert "cannot login" in ev1[2].lower() - wait_configuration_progress(ac1, 0, 0) + wait_configuration_progress(ac1, 0, 0, check_error=False) def test_invalid_user(self, acfactory): ac1, configdict = acfactory.get_online_config() ac1.configure(addr="x" + configdict["addr"], mail_pw=configdict["mail_pw"]) wait_configuration_progress(ac1, 500) - ev1 = ac1._evlogger.get_matching("DC_EVENT_ERROR_NETWORK") + ev1 = ac1._evlogger.get_matching("DC_EVENT_ERROR_NETWORK", check_error=False) assert "cannot login" in ev1[2].lower() - wait_configuration_progress(ac1, 0, 0) + wait_configuration_progress(ac1, 0, 0, check_error=False) def test_invalid_domain(self, acfactory): ac1, configdict = acfactory.get_online_config() ac1.configure(addr=configdict["addr"] + "x", mail_pw=configdict["mail_pw"]) - wait_configuration_progress(ac1, 500) + wait_configuration_progress(ac1, 500, check_error=False) ev1 = ac1._evlogger.get_matching("DC_EVENT_ERROR_NETWORK") assert "could not connect" in ev1[2].lower() - wait_configuration_progress(ac1, 0, 0) + wait_configuration_progress(ac1, 0, 0, check_error=False)