[tor-commits] [bridgedb/master] Fix doctest for bridgedb.crypto.getKey().

isis at torproject.org isis at torproject.org
Sun Jan 12 06:06:35 UTC 2014


commit c6ca47bb1acba136378b6ce4bea48636e103fcdf
Author: Isis Lovecruft <isis at torproject.org>
Date:   Fri Dec 20 07:02:31 2013 +0000

    Fix doctest for bridgedb.crypto.getKey().
---
 lib/bridgedb/crypto.py |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/bridgedb/crypto.py b/lib/bridgedb/crypto.py
index d67966d..6b16e49 100644
--- a/lib/bridgedb/crypto.py
+++ b/lib/bridgedb/crypto.py
@@ -25,15 +25,17 @@ def getKey(filename):
     If ``filename`` does not exist, create a new 32-byte key and store it in
     ``filename``.
 
-    >>> name = os.tmpnam()
+    >>> import os
+    >>> from bridgedb import crypto
+    >>> name = 'doctest_getKey'
     >>> os.path.exists(name)
     False
-    >>> k1 = getKey(name)
+    >>> k1 = crypto.getKey(name)
     >>> os.path.exists(name)
     True
     >>> open(name).read() == k1
     True
-    >>> k2 = getKey(name)
+    >>> k2 = crypto.getKey(name)
     >>> k1 == k2
     True
 





More information about the tor-commits mailing list