def test_provider_info_none(): ctx = ffi.gc( lib.dc_context_new(lib.py_dc_callback, ffi.NULL, ffi.NULL), lib.dc_context_unref, ) assert lib.dc_provider_new_from_email( ctx, cutil.as_dc_charpointer("*****@*****.**")) == ffi.NULL
def test_provider_info(): provider = lib.dc_provider_new_from_email(cutil.as_dc_charpointer("*****@*****.**")) assert cutil.from_dc_charpointer( lib.dc_provider_get_overview_page(provider) ) == "https://providers.delta.chat/example.com" assert cutil.from_dc_charpointer(lib.dc_provider_get_name(provider)) == "Example" assert cutil.from_dc_charpointer(lib.dc_provider_get_markdown(provider)) == "\n..." assert cutil.from_dc_charpointer(lib.dc_provider_get_status_date(provider)) == "2018-09" assert lib.dc_provider_get_status(provider) == const.DC_PROVIDER_STATUS_PREPARATION
def test_provider_info_none(): assert lib.dc_provider_new_from_email( cutil.as_dc_charpointer("*****@*****.**")) == ffi.NULL