mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +03:00
Add a test for fix in #541
A fixed bug should have a test. This is an easy test to write.
This commit is contained in:
committed by
holger krekel
parent
ceff85d892
commit
70234e5b19
@@ -59,6 +59,16 @@ def test_wrong_db(tmpdir):
|
|||||||
assert not lib.dc_open(dc_context, p.strpath.encode("ascii"), ffi.NULL)
|
assert not lib.dc_open(dc_context, p.strpath.encode("ascii"), ffi.NULL)
|
||||||
|
|
||||||
|
|
||||||
|
def test_empty_blobdir(tmpdir):
|
||||||
|
# Apparently some client code expects this to be the same as passing NULL.
|
||||||
|
ctx = ffi.gc(
|
||||||
|
lib.dc_context_new(lib.py_dc_callback, ffi.NULL, ffi.NULL),
|
||||||
|
lib.dc_context_unref,
|
||||||
|
)
|
||||||
|
db_fname = tmpdir.join("hello.db")
|
||||||
|
assert lib.dc_open(ctx, db_fname.strpath.encode("ascii"), b"")
|
||||||
|
|
||||||
|
|
||||||
def test_event_defines():
|
def test_event_defines():
|
||||||
assert const.DC_EVENT_INFO == 100
|
assert const.DC_EVENT_INFO == 100
|
||||||
assert const.DC_CONTACT_ID_SELF
|
assert const.DC_CONTACT_ID_SELF
|
||||||
|
|||||||
Reference in New Issue
Block a user