mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #28064 -- Removed double-quoting of key names in MultiValueDictKeyError.
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user