mirror of
https://github.com/chatmail/core.git
synced 2026-04-06 07:32:12 +03:00
Rename save_self_keypair
For the ffi rename to dc_preconfigure_keypair. For the internal API to store_self_keypair.
This commit is contained in:
committed by
Floris Bruynooghe
parent
a903805cd9
commit
fc0292bf8a
@@ -118,15 +118,15 @@ class Account(object):
|
||||
assert res != ffi.NULL, "config value not found for: {!r}".format(name)
|
||||
return from_dc_charpointer(res)
|
||||
|
||||
def _save_self_keypair(self, addr, public, secret):
|
||||
def _preconfigure_keypair(self, addr, public, secret):
|
||||
"""See _dc_save_self_keypair() in deltachat.h.
|
||||
|
||||
In other words, you don't need this.
|
||||
"""
|
||||
res = lib._dc_save_self_keypair(self._dc_context,
|
||||
as_dc_charpointer(addr),
|
||||
as_dc_charpointer(public),
|
||||
as_dc_charpointer(secret))
|
||||
res = lib.dc_preconfigure_keypair(self._dc_context,
|
||||
as_dc_charpointer(addr),
|
||||
as_dc_charpointer(public),
|
||||
as_dc_charpointer(secret))
|
||||
if res == 0:
|
||||
raise Exception("Failed to set key")
|
||||
|
||||
|
||||
@@ -35,11 +35,11 @@ class TestOfflineAccountBasic:
|
||||
ac1 = Account(p.strpath, os_name="solarpunk")
|
||||
ac1.get_info()
|
||||
|
||||
def test_save_self_keypair(self, acfactory, datadir):
|
||||
def test_preconfigure_keypair(self, acfactory, datadir):
|
||||
ac = acfactory.get_unconfigured_account()
|
||||
ac._save_self_keypair("alice@example.com",
|
||||
datadir.join('key/alice-public.asc').read(),
|
||||
datadir.join('key/alice-secret.asc').read())
|
||||
ac._preconfigure_keypair("alice@example.com",
|
||||
datadir.join('key/alice-public.asc').read(),
|
||||
datadir.join('key/alice-secret.asc').read())
|
||||
|
||||
def test_getinfo(self, acfactory):
|
||||
ac1 = acfactory.get_unconfigured_account()
|
||||
|
||||
Reference in New Issue
Block a user