From d818e0c9b2b88276cc499974f9eee893170bf0a8 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 20 Jan 2014 10:45:21 +0800 Subject: Fixed #16905 -- Added extensible checks (nee validation) framework MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- tests/inline_formsets/tests.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/inline_formsets/tests.py') 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, - " has more than 1 ForeignKey to ", + 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, - " has no field named 'test'", + self, ValueError, + "'inline_formsets.Child' has no field named 'test'.", inlineformset_factory, Parent, Child, fk_name='test' ) -- cgit v1.3