1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[py3k] Silence many warnings while running the tests.

This commit is contained in:
Alex Gaynor
2012-09-07 13:17:09 -04:00
parent 4321ee25c5
commit 292322f977
29 changed files with 213 additions and 196 deletions

View File

@@ -123,7 +123,7 @@ class InlineFormsetFactoryTest(TestCase):
Child has two ForeignKeys to Parent, so if we don't specify which one
to use for the inline formset, we should get an exception.
"""
self.assertRaisesRegexp(Exception,
six.assertRaisesRegex(self, Exception,
"<class 'regressiontests.inline_formsets.models.Child'> has more than 1 ForeignKey to <class 'regressiontests.inline_formsets.models.Parent'>",
inlineformset_factory, Parent, Child
)
@@ -143,7 +143,7 @@ class InlineFormsetFactoryTest(TestCase):
If the field specified in fk_name is not a ForeignKey, we should get an
exception.
"""
self.assertRaisesRegexp(Exception,
six.assertRaisesRegex(self, Exception,
"<class 'regressiontests.inline_formsets.models.Child'> has no field named 'test'",
inlineformset_factory, Parent, Child, fk_name='test'
)