diff --git a/python/tests/test_4_lowlevel.py b/python/tests/test_4_lowlevel.py index 17d7de99f..efede80b8 100644 --- a/python/tests/test_4_lowlevel.py +++ b/python/tests/test_4_lowlevel.py @@ -157,20 +157,19 @@ def test_logged_hook_failure(acfactory): def test_logged_ac_process_ffi_failure(acfactory): from deltachat import account_hookimpl - ac1 = acfactory.get_unconfigured_account() - acfactory._acsetup.init_logging(ac1) + ac1 = acfactory.get_pseudo_configured_account() class FailPlugin: @account_hookimpl def ac_process_ffi_event(ffi_event): 0/0 + cap = Queue() + ac1.log = cap.put ac1.add_account_plugin(FailPlugin()) - cap = [] - ac1.log = cap.append # cause any event eg contact added/changed ac1.create_contact("something@example.org") - assert cap - assert "ac_process_ffi_event" in str(cap) - assert "ZeroDivisionError" in str(cap) - assert "Traceback" in str(cap) + res = cap.get(timeout=10) + assert "ac_process_ffi_event" in res + assert "ZeroDivisionError" in res + assert "Traceback" in res