Replace old doctest in GPG.gen_key_input().
parent
352668b7af
commit
b6797d6a47
11
src/gnupg.py
11
src/gnupg.py
|
@ -1059,12 +1059,11 @@ use_agent: %s
|
||||||
"""Generate a GnuPG key through batch file key generation. See
|
"""Generate a GnuPG key through batch file key generation. See
|
||||||
:meth:`GPG.gen_key_input()` for creating the control input.
|
:meth:`GPG.gen_key_input()` for creating the control input.
|
||||||
|
|
||||||
>>> gpg = GPG(homedir="keys")
|
>>> import gnupg
|
||||||
>>> input = gpg.gen_key_input()
|
>>> gpg = gnupg.GPG(homedir="./tests/doctest")
|
||||||
>>> result = gpg.gen_key(input)
|
>>> key_input = gpg.gen_key_input()
|
||||||
>>> assert result
|
>>> key = gpg.gen_key(key_input)
|
||||||
>>> result = gpg.gen_key('foo')
|
>>> assert key.fingerprint
|
||||||
>>> assert not result
|
|
||||||
|
|
||||||
:param dict input: A dictionary of parameters and values for the new
|
:param dict input: A dictionary of parameters and values for the new
|
||||||
key.
|
key.
|
||||||
|
|
Loading…
Reference in New Issue