diff options
Diffstat (limited to 'wsgitools/digest.py')
-rwxr-xr-x | wsgitools/digest.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/wsgitools/digest.py b/wsgitools/digest.py index b4f9f36..b976b9b 100755 --- a/wsgitools/digest.py +++ b/wsgitools/digest.py @@ -42,6 +42,11 @@ def parse_digest_response(data, ret=dict()): ... except ValueError: ... print("ValueError") ValueError + >>> try: + ... parse_digest_response('spam="egg"error') + ... except ValueError: + ... print("ValueError") + ValueError """ data = data.strip() key, rest = data.split('=', 1) # raises ValueError @@ -150,6 +155,8 @@ class StatelessNonceStore(NonceStoreBase): True >>> s.checknonce(n) True + >>> s.checknonce(n.rsplit(':', 1)[0] + "bad hash") + False """ def __init__(self, maxage=300, secret=None): """ |