1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-04 18:29:19 +02:00

emit and look for DC_EVENT_(SMTP|IMAP)_CONNECTED events which are INFO events so that we can also for other events convert the C-code easily (just use "dc_log_event" instead of "dc_log_info")

This commit is contained in:
holger krekel 2018-09-08 14:06:16 +02:00
parent 1c77187d5a
commit 3265178d31
9 changed files with 51 additions and 13 deletions

View file

@ -30,10 +30,10 @@ class TestLive:
imap_ok = smtp_ok = False
while not imap_ok or not smtp_ok:
evt_name, data1, data2 = \
ac1._evlogger.get_matching("DC_EVENT_INFO", timeout=5)
if re.match("imap-login.*ok.", data2.lower()):
ac1._evlogger.get_matching("DC_EVENT_(IMAP|SMTP)_CONNECTED")
if evt_name == "DC_EVENT_IMAP_CONNECTED":
imap_ok = True
if re.match("smtp-login.*ok.", data2.lower()):
if evt_name == "DC_EVENT_SMTP_CONNECTED":
smtp_ok = True
assert ac1.get_config("mail_pw")