mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-04 02:09:17 +02:00
added a more general way to configure live test accounts for testing
This commit is contained in:
parent
940f665b54
commit
c02abb8a61
5 changed files with 67 additions and 39 deletions
27
python/tests/test_account.py
Normal file
27
python/tests/test_account.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
from __future__ import print_function
|
||||
import re
|
||||
|
||||
try:
|
||||
from queue import Queue
|
||||
except ImportError:
|
||||
from Queue import Queue
|
||||
|
||||
|
||||
class TestLive:
|
||||
def test_basic_configure_login_ok(self, acfactory):
|
||||
q = Queue()
|
||||
acfactory.get_live_account(logcallback=q.put)
|
||||
imap_ok = smtp_ok = False
|
||||
while not imap_ok or not smtp_ok:
|
||||
evt_name, data1, data2 = q.get(timeout=5.0)
|
||||
print(evt_name, data1, data2)
|
||||
if evt_name == "DC_EVENT_ERROR":
|
||||
assert 0
|
||||
if evt_name == "DC_EVENT_INFO":
|
||||
if re.match("imap-login.*ok.", data2.lower()):
|
||||
imap_ok = True
|
||||
if re.match("smtp-login.*ok.", data2.lower()):
|
||||
smtp_ok = True
|
||||
|
||||
def test_message_send_receive(self, acfactory):
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue