summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-11 08:22:06 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-11 08:22:06 +0000
commitf9982c5c08f02699dddf097986a6b3bed54bf5a5 (patch)
treed8ad80af1aeae3bc0302534d4e609a6febd6b255 /tests
parent8562216c40e1a68b40eb9929daf125ae82cca035 (diff)
Fixed #4270 -- Don't permit deleting of items from an immutable QueryDict.
Thanks, Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/httpwrappers/tests.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/regressiontests/httpwrappers/tests.py b/tests/regressiontests/httpwrappers/tests.py
index 29cb8385e0..c8016bc5bd 100644
--- a/tests/regressiontests/httpwrappers/tests.py
+++ b/tests/regressiontests/httpwrappers/tests.py
@@ -96,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'
@@ -367,6 +373,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