summaryrefslogtreecommitdiff
path: root/tests/regressiontests/httpwrappers/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/regressiontests/httpwrappers/tests.py')
-rw-r--r--tests/regressiontests/httpwrappers/tests.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/regressiontests/httpwrappers/tests.py b/tests/regressiontests/httpwrappers/tests.py
index 385c3048d9..e7245104e9 100644
--- a/tests/regressiontests/httpwrappers/tests.py
+++ b/tests/regressiontests/httpwrappers/tests.py
@@ -34,6 +34,9 @@ AttributeError: This QueryDict instance is immutable
>>> q.has_key('foo')
False
+>>> 'foo' in q
+False
+
>>> q.items()
[]
@@ -93,6 +96,12 @@ MultiValueDictKeyError: "Key 'foo' not found in <MultiValueDict: {}>"
>>> q['name']
'john'
+>>> del q['name']
+>>> 'name' in q
+False
+
+>>> q['name'] = 'john'
+
>>> q.get('foo', 'default')
'default'
@@ -124,6 +133,9 @@ MultiValueDictKeyError: "Key 'foo' not found in <MultiValueDict: {}>"
>>> q.has_key('foo')
True
+>>> 'foo' in q
+True
+
>>> q.items()
[('foo', 'another'), ('name', 'john')]
@@ -154,6 +166,9 @@ True
>>> q.pop('foo')
['bar', 'baz', 'another', 'hello']
+>>> q.pop('foo', 'not there')
+'not there'
+
>>> q.get('foo', 'not there')
'not there'
@@ -218,9 +233,15 @@ AttributeError: This QueryDict instance is immutable
>>> q.has_key('foo')
True
+>>> 'foo' in q
+True
+
>>> q.has_key('bar')
False
+>>> 'bar' in q
+False
+
>>> q.items()
[('foo', 'bar')]
@@ -303,9 +324,15 @@ AttributeError: This QueryDict instance is immutable
>>> q.has_key('vote')
True
+>>> 'vote' in q
+True
+
>>> q.has_key('foo')
False
+>>> 'foo' in q
+False
+
>>> q.items()
[('vote', 'no')]
@@ -349,6 +376,11 @@ AttributeError: This QueryDict instance is immutable
>>> q.urlencode()
'vote=yes&vote=no'
+>>> del q['vote']
+Traceback (most recent call last):
+...
+AttributeError: This QueryDict instance is immutable
+
"""
from django.http import QueryDict