summaryrefslogtreecommitdiff
path: root/wsgitools/digest.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2011-07-25 00:16:36 +0200
committerHelmut Grohne <helmut@subdivi.de>2011-07-25 00:16:36 +0200
commit611878462ab490e23796bdcebd302d1f87f7508d (patch)
treece264c3f0222fbdefb3e3143fe78e004929e1324 /wsgitools/digest.py
parentcc28226b4afcd1803c9790e8ba238e2125ce0129 (diff)
downloadwsgitools-611878462ab490e23796bdcebd302d1f87f7508d.tar.gz
added more nonce store test cases to digest module
Diffstat (limited to 'wsgitools/digest.py')
-rw-r--r--wsgitools/digest.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/wsgitools/digest.py b/wsgitools/digest.py
index 86de17e..6ee0b6d 100644
--- a/wsgitools/digest.py
+++ b/wsgitools/digest.py
@@ -360,6 +360,9 @@ class MemoryNonceStore(NonceStoreBase):
True
>>> s.checknonce(n)
False
+ >>> n = s.newnonce()
+ >>> s.checknonce(n.rsplit(':', 1)[0] + "bad hash")
+ False
"""
def __init__(self, maxage=300, maxuses=5):
"""
@@ -500,6 +503,9 @@ class DBAPI2NonceStore(NonceStoreBase):
True
>>> s.checknonce(n)
False
+ >>> n = s.newnonce()
+ >>> s.checknonce(n.rsplit(':', 1)[0] + "bad hash")
+ False
"""
def __init__(self, dbhandle, maxage=300, maxuses=5, table="nonces"):
"""