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

address the remaining comments

This commit is contained in:
holger krekel 2018-09-09 13:40:57 +02:00
parent 75153289ef
commit 49040f4e92
4 changed files with 18 additions and 6 deletions

View file

@ -1,13 +1,13 @@
from __future__ import print_function
import pytest
from deltachat.capi import lib
class TestOfflineAccount:
def test_selfcontact(self, acfactory):
def test_selfcontact_if_unconfigured(self, acfactory):
ac1 = acfactory.get_offline_account()
me = ac1.get_self_contact()
assert me.display_name
# assert me.addr # xxx why is this empty?
with pytest.raises(ValueError):
ac1.get_self_contact()
def test_contacts(self, acfactory):
ac1 = acfactory.get_offline_account()
@ -50,6 +50,13 @@ class TestOnlineAccount:
print("** CONFIG PROGRESS {}".format(target), account.dc_context)
break
def test_selfcontact(self, acfactory):
ac1 = acfactory.get_live_account()
self.wait_configuration_progress(ac1, 1000)
me = ac1.get_self_contact()
assert me.display_name
assert me.addr
def test_basic_configure_login_ok(self, acfactory):
ac1 = acfactory.get_live_account()
self.wait_successful_IMAP_SMTP_connection(ac1)

View file

@ -11,6 +11,7 @@ def test_event_defines():
assert capi.lib.DC_EVENT_INFO == 100
assert capi.lib.DC_CONTACT_ID_SELF
def test_sig():
sig = capi.lib.dc_get_event_signature_types
assert sig(capi.lib.DC_EVENT_INFO) == 2