magic-removal: Fixed #1141 -- Fixed unit-test failures in [1799]. Thanks, Russ
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1801 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a22a7ff4d0
commit
9d5272d61d
|
@ -74,7 +74,7 @@ class MultiValueDict(dict):
|
||||||
try:
|
try:
|
||||||
list_ = dict.__getitem__(self, key)
|
list_ = dict.__getitem__(self, key)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise MultiValueDictKeyError, "Key %r not found in MultiValueDict %r" % (key, self)
|
raise MultiValueDictKeyError, "Key %r not found in %r" % (key, self)
|
||||||
try:
|
try:
|
||||||
return list_[-1]
|
return list_[-1]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
>>> q['foo']
|
>>> q['foo']
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
...
|
...
|
||||||
MultiValueDictKeyError: "Key 'foo' not found in MultiValueDict {}"
|
MultiValueDictKeyError: "Key 'foo' not found in <MultiValueDict: {}>"
|
||||||
|
|
||||||
>>> q['something'] = 'bar'
|
>>> q['something'] = 'bar'
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
|
@ -86,7 +86,7 @@ AttributeError: This QueryDict instance is immutable
|
||||||
>>> q['foo']
|
>>> q['foo']
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
...
|
...
|
||||||
MultiValueDictKeyError: "Key 'foo' not found in MultiValueDict {}"
|
MultiValueDictKeyError: "Key 'foo' not found in <MultiValueDict: {}>"
|
||||||
|
|
||||||
>>> q['name'] = 'john'
|
>>> q['name'] = 'john'
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ True
|
||||||
>>> q['bar']
|
>>> q['bar']
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
...
|
...
|
||||||
MultiValueDictKeyError: "Key 'bar' not found in MultiValueDict {'foo': ['bar']}"
|
MultiValueDictKeyError: "Key 'bar' not found in <MultiValueDict: {'foo': ['bar']}>"
|
||||||
|
|
||||||
>>> q['something'] = 'bar'
|
>>> q['something'] = 'bar'
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
|
|
Loading…
Reference in New Issue