mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-04 10:19:16 +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:
parent
b0e619cdc4
commit
c4418a0e14
7 changed files with 128 additions and 42 deletions
|
@ -1,6 +1,6 @@
|
|||
from __future__ import print_function
|
||||
import pytest
|
||||
from deltachat import capi, Account
|
||||
from deltachat import capi, Account, const
|
||||
|
||||
|
||||
def test_empty_context():
|
||||
|
@ -15,15 +15,15 @@ def test_wrong_db(tmpdir):
|
|||
|
||||
|
||||
def test_event_defines():
|
||||
assert capi.lib.DC_EVENT_INFO == 100
|
||||
assert capi.lib.DC_CONTACT_ID_SELF
|
||||
assert const.DC_EVENT_INFO == 100
|
||||
assert const.DC_CONTACT_ID_SELF
|
||||
|
||||
|
||||
def test_sig():
|
||||
sig = capi.lib.dc_get_event_signature_types
|
||||
assert sig(capi.lib.DC_EVENT_INFO) == 2
|
||||
assert sig(capi.lib.DC_EVENT_WARNING) == 2
|
||||
assert sig(capi.lib.DC_EVENT_ERROR) == 2
|
||||
assert sig(capi.lib.DC_EVENT_SMTP_CONNECTED) == 2
|
||||
assert sig(capi.lib.DC_EVENT_IMAP_CONNECTED) == 2
|
||||
assert sig(capi.lib.DC_EVENT_SMTP_MESSAGE_SENT) == 2
|
||||
assert sig(const.DC_EVENT_INFO) == 2
|
||||
assert sig(const.DC_EVENT_WARNING) == 2
|
||||
assert sig(const.DC_EVENT_ERROR) == 2
|
||||
assert sig(const.DC_EVENT_SMTP_CONNECTED) == 2
|
||||
assert sig(const.DC_EVENT_IMAP_CONNECTED) == 2
|
||||
assert sig(const.DC_EVENT_SMTP_MESSAGE_SENT) == 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue