From b6797d6a477cf79ce4e30194feb6dbeb1f99c91c Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Wed, 22 May 2013 17:06:45 +0000 Subject: [PATCH] Replace old doctest in GPG.gen_key_input(). --- src/gnupg.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/gnupg.py b/src/gnupg.py index 0c82531..d5d2d77 100644 --- a/src/gnupg.py +++ b/src/gnupg.py @@ -1059,12 +1059,11 @@ use_agent: %s """Generate a GnuPG key through batch file key generation. See :meth:`GPG.gen_key_input()` for creating the control input. - >>> gpg = GPG(homedir="keys") - >>> input = gpg.gen_key_input() - >>> result = gpg.gen_key(input) - >>> assert result - >>> result = gpg.gen_key('foo') - >>> assert not result + >>> import gnupg + >>> gpg = gnupg.GPG(homedir="./tests/doctest") + >>> key_input = gpg.gen_key_input() + >>> key = gpg.gen_key(key_input) + >>> assert key.fingerprint :param dict input: A dictionary of parameters and values for the new key.