mirror of
https://github.com/chatmail/core.git
synced 2026-04-06 07:32:12 +03:00
test: encrypt legacy Python tests
This makes it possible to run Python tests against chatmail servers that don't allow any unencrypted messages.
This commit is contained in:
@@ -280,6 +280,12 @@ class Account:
|
||||
:param name: (optional) display name for this contact
|
||||
:returns: :class:`deltachat.contact.Contact` instance.
|
||||
"""
|
||||
if isinstance(obj, Account):
|
||||
if not obj.is_configured():
|
||||
raise ValueError("Can only add configured accounts as contacts")
|
||||
assert name is None
|
||||
vcard = obj.get_self_contact().make_vcard()
|
||||
return self.import_vcard(vcard)[0]
|
||||
(name, addr) = self.get_contact_addr_and_name(obj, name)
|
||||
name_c = as_dc_charpointer(name)
|
||||
addr_c = as_dc_charpointer(addr)
|
||||
|
||||
Reference in New Issue
Block a user