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 c30d0e9..65560f6 100755 --- a/wsgitools/digest.py +++ b/wsgitools/digest.py @@ -15,6 +15,13 @@ sysrand = random.SystemRandom() def parse_digest_response(data, ret=dict()): """internal @raises ValueError: + + >>> parse_digest_response('foo=bar') + {'foo': 'bar'} + >>> parse_digest_response('foo="bar"') + {'foo': 'bar'} + >>> sorted(parse_digest_response('foo="bar=qux",spam=egg').items()) + [('foo', 'bar=qux'), ('spam', 'egg')] """ data = data.strip() key, rest = data.split('=', 1) # raises ValueError |