From afd040d4d3a06fe92e3080870b2ff2095ce86a75 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 3 Mar 2011 15:04:39 +0000 Subject: Updated test assertions that have been deprecated by the move to unittest2. In summary, this means: assert_ -> assertTrue assertEquals -> assertEqual failUnless -> assertTrue For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/model_forms_regress/tests.py | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'tests/regressiontests/model_forms_regress/tests.py') diff --git a/tests/regressiontests/model_forms_regress/tests.py b/tests/regressiontests/model_forms_regress/tests.py index 2aedf2fa65..fe1ad21d31 100644 --- a/tests/regressiontests/model_forms_regress/tests.py +++ b/tests/regressiontests/model_forms_regress/tests.py @@ -80,7 +80,7 @@ class OverrideCleanTests(TestCase): self.assertTrue(form.is_valid()) # form.instance.left will be None if the instance was not constructed # by form.full_clean(). - self.assertEquals(form.instance.left, 1) + self.assertEqual(form.instance.left, 1) # Regression test for #12960. # Make sure the cleaned_data returned from ModelForm.clean() is applied to the @@ -133,7 +133,7 @@ class ManyToManyCallableInitialTests(TestCase): # Create a ModelForm, instantiate it, and check that the output is as expected ModelForm = modelform_factory(Article, formfield_callback=formfield_for_dbfield) form = ModelForm() - self.assertEquals(form.as_ul(), u"""
  • + self.assertEqual(form.as_ul(), u"""