diff options
Diffstat (limited to 'tests/inline_formsets')
| -rw-r--r-- | tests/inline_formsets/tests.py | 9 |
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' ) |
