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

generate DC_* constants in new deltachat.const module which are living as #define macros in deltachat.h. You can re-generate with "python src/deltachat/const.py".

This commit is contained in:
holger krekel 2018-09-26 11:21:13 +02:00
parent b0e619cdc4
commit c4418a0e14
7 changed files with 128 additions and 42 deletions

View file

@ -1,6 +1,6 @@
from __future__ import print_function
import pytest
from deltachat.capi import lib
from deltachat import const
from datetime import datetime, timedelta
from conftest import wait_configuration_progress, wait_successful_IMAP_SMTP_connection
@ -54,7 +54,7 @@ class TestOfflineAccount:
ac1 = acfactory.get_configured_offline_account()
contact1 = ac1.create_contact("some1@hello.com", name="some1")
chat = ac1.create_chat_by_contact(contact1)
assert chat.id >= lib.DC_CHAT_ID_LAST_SPECIAL, chat.id
assert chat.id >= const.DC_CHAT_ID_LAST_SPECIAL, chat.id
chat2 = ac1.create_chat_by_contact(contact1.id)
assert chat2.id == chat.id
@ -125,7 +125,7 @@ class TestOnlineAccount:
ac2 = acfactory.get_online_configuring_account()
c2 = ac1.create_contact(email=ac2.get_config("addr"))
chat = ac1.create_chat_by_contact(c2)
assert chat.id >= lib.DC_CHAT_ID_LAST_SPECIAL
assert chat.id >= const.DC_CHAT_ID_LAST_SPECIAL
wait_successful_IMAP_SMTP_connection(ac1)
wait_configuration_progress(ac1, 1000)
wait_successful_IMAP_SMTP_connection(ac2)
@ -158,7 +158,7 @@ class TestOnlineAccount:
ac2 = acfactory.get_online_configuring_account()
c2 = ac1.create_contact(email=ac2.get_config("addr"))
chat = ac1.create_chat_by_contact(c2)
assert chat.id >= lib.DC_CHAT_ID_LAST_SPECIAL
assert chat.id >= const.DC_CHAT_ID_LAST_SPECIAL
wait_configuration_progress(ac1, 1000)
wait_configuration_progress(ac2, 1000)