mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Refactored ValidationError to allow persisting error params and error codes as the exception bubbles up
This commit is contained in:
parent
efe6e16008
commit
f34cfec0fa
6 changed files with 67 additions and 55 deletions
|
@ -213,7 +213,7 @@ class TestSimpleValidators(TestCase):
|
|||
self.assertEqual(repr(v), str_prefix("ValidationError([%(_)s'First Problem', %(_)s'Second Problem'])"))
|
||||
|
||||
def test_message_dict(self):
|
||||
v = ValidationError({'first': 'First Problem'})
|
||||
v = ValidationError({'first': ['First Problem']})
|
||||
self.assertEqual(str(v), str_prefix("{%(_)s'first': %(_)s'First Problem'}"))
|
||||
self.assertEqual(repr(v), str_prefix("ValidationError({%(_)s'first': %(_)s'First Problem'})"))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue