mirror of
https://github.com/django/django.git
synced 2025-08-23 12:04:21 +00:00
Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as appropriate.
This commit is contained in:
parent
253adc2b8a
commit
26ad01719d
23 changed files with 124 additions and 221 deletions
|
@ -49,8 +49,8 @@ class MultiValueDictTests(SimpleTestCase):
|
|||
[('name', ['Adrian', 'Simon']), ('position', ['Developer'])]
|
||||
)
|
||||
|
||||
six.assertRaisesRegex(self, MultiValueDictKeyError, 'lastname',
|
||||
d.__getitem__, 'lastname')
|
||||
with self.assertRaisesMessage(MultiValueDictKeyError, 'lastname'):
|
||||
d.__getitem__('lastname')
|
||||
|
||||
self.assertEqual(d.get('lastname'), None)
|
||||
self.assertEqual(d.get('lastname', 'nonexistent'), 'nonexistent')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue