summaryrefslogtreecommitdiff
path: root/tests/inline_formsets
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2014-01-20 10:45:21 +0800
committerRussell Keith-Magee <russell@keith-magee.com>2014-01-20 10:45:21 +0800
commitd818e0c9b2b88276cc499974f9eee893170bf0a8 (patch)
tree13ef631f7ba50bf81fa36f484abf925ba8172651 /tests/inline_formsets
parent6e7bd0b63bd01949ac4fd647f2597639bed0c3a2 (diff)
downloaddjango-d818e0c9b2b88276cc499974f9eee893170bf0a8.tar.gz
Fixed #16905 -- Added extensible checks (nee validation) framework
This is the result of Christopher Medrela's 2013 Summer of Code project. Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian Apolloner, and Alex Gaynor for review notes along the way. Also: Fixes #8579, fixes #3055, fixes #19844.
Diffstat (limited to 'tests/inline_formsets')
-rw-r--r--tests/inline_formsets/tests.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/inline_formsets/tests.py b/tests/inline_formsets/tests.py
index e3c37bb320..87add7f6e6 100644
--- a/tests/inline_formsets/tests.py
+++ b/tests/inline_formsets/tests.py
@@ -124,8 +124,9 @@ class InlineFormsetFactoryTest(TestCase):
to use for the inline formset, we should get an exception.
"""
six.assertRaisesRegex(
- self, Exception,
- "<class 'inline_formsets.models.Child'> has more than 1 ForeignKey to <class 'inline_formsets.models.Parent'>",
+ self,
+ ValueError,
+ "'inline_formsets.Child' has more than one ForeignKey to 'inline_formsets.Parent'.",
inlineformset_factory, Parent, Child
)
@@ -146,8 +147,8 @@ class InlineFormsetFactoryTest(TestCase):
exception.
"""
six.assertRaisesRegex(
- self, Exception,
- "<class 'inline_formsets.models.Child'> has no field named 'test'",
+ self, ValueError,
+ "'inline_formsets.Child' has no field named 'test'.",
inlineformset_factory, Parent, Child, fk_name='test'
)