mirror of
https://github.com/django/django.git
synced 2025-08-23 12:04:21 +00:00
Fixed #28064 -- Removed double-quoting of key names in MultiValueDictKeyError.
This commit is contained in:
parent
7060f777b0
commit
14671affc3
2 changed files with 3 additions and 2 deletions
|
@ -48,8 +48,9 @@ class MultiValueDictTests(SimpleTestCase):
|
|||
[('name', ['Adrian', 'Simon']), ('position', ['Developer'])]
|
||||
)
|
||||
|
||||
with self.assertRaisesMessage(MultiValueDictKeyError, 'lastname'):
|
||||
with self.assertRaises(MultiValueDictKeyError) as cm:
|
||||
d.__getitem__('lastname')
|
||||
self.assertEqual(str(cm.exception), "'lastname'")
|
||||
|
||||
self.assertIsNone(d.get('lastname'))
|
||||
self.assertEqual(d.get('lastname', 'nonexistent'), 'nonexistent')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue