summaryrefslogtreecommitdiff
path: root/tests/regressiontests/forms
diff options
context:
space:
mode:
Diffstat (limited to 'tests/regressiontests/forms')
-rw-r--r--tests/regressiontests/forms/localflavor/fi.py2
-rw-r--r--tests/regressiontests/forms/localflavor/us.py2
-rw-r--r--tests/regressiontests/forms/tests/formsets.py8
-rw-r--r--tests/regressiontests/forms/tests/models.py8
4 files changed, 10 insertions, 10 deletions
diff --git a/tests/regressiontests/forms/localflavor/fi.py b/tests/regressiontests/forms/localflavor/fi.py
index 161eb1743b..3ad95e6148 100644
--- a/tests/regressiontests/forms/localflavor/fi.py
+++ b/tests/regressiontests/forms/localflavor/fi.py
@@ -351,7 +351,7 @@ class FILocalFlavorTests(LocalFlavorTestCase):
<option value="ahtari">\xc4ht\xe4ri</option>
<option value="aanekoski">\xc4\xe4nekoski</option>
</select>'''
- self.assertEquals(f.render('municipalities', 'turku'), out)
+ self.assertEqual(f.render('municipalities', 'turku'), out)
def test_FIZipCodeField(self):
error_format = [u'Enter a zip code in the format XXXXX.']
diff --git a/tests/regressiontests/forms/localflavor/us.py b/tests/regressiontests/forms/localflavor/us.py
index cde97c8743..8924f0b2da 100644
--- a/tests/regressiontests/forms/localflavor/us.py
+++ b/tests/regressiontests/forms/localflavor/us.py
@@ -68,7 +68,7 @@ class USLocalFlavorTests(LocalFlavorTestCase):
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
</select>'''
- self.assertEquals(f.render('state', 'IL'), out)
+ self.assertEqual(f.render('state', 'IL'), out)
def test_USZipCodeField(self):
error_format = [u'Enter a zip code in the format XXXXX or XXXXX-XXXX.']
diff --git a/tests/regressiontests/forms/tests/formsets.py b/tests/regressiontests/forms/tests/formsets.py
index fd854ecaba..4451fc76b1 100644
--- a/tests/regressiontests/forms/tests/formsets.py
+++ b/tests/regressiontests/forms/tests/formsets.py
@@ -856,13 +856,13 @@ class TestIsBoundBehavior(TestCase):
'form-INITIAL_FORMS': u'0',
}
formset = ArticleFormSet(data)
- self.assertEquals(0, formset.initial_form_count())
- self.assertEquals(1, formset.total_form_count())
+ self.assertEqual(0, formset.initial_form_count())
+ self.assertEqual(1, formset.total_form_count())
self.assertTrue(formset.is_bound)
self.assertTrue(formset.forms[0].is_bound)
self.assertTrue(formset.is_valid())
self.assertTrue(formset.forms[0].is_valid())
- self.assertEquals([{}], formset.cleaned_data)
+ self.assertEqual([{}], formset.cleaned_data)
def test_form_errors_are_cought_by_formset(self):
@@ -876,7 +876,7 @@ class TestIsBoundBehavior(TestCase):
}
formset = ArticleFormSet(data)
self.assertFalse(formset.is_valid())
- self.assertEquals([{}, {'pub_date': [u'This field is required.']}], formset.errors)
+ self.assertEqual([{}, {'pub_date': [u'This field is required.']}], formset.errors)
def test_empty_forms_are_unbound(self):
data = {
diff --git a/tests/regressiontests/forms/tests/models.py b/tests/regressiontests/forms/tests/models.py
index cfdd4f4bfc..3f548df982 100644
--- a/tests/regressiontests/forms/tests/models.py
+++ b/tests/regressiontests/forms/tests/models.py
@@ -33,15 +33,15 @@ class ModelFormCallableModelDefault(TestCase):
option = ChoiceOptionModel.objects.create(name='default')
choices = list(ChoiceFieldForm().fields['choice'].choices)
- self.assertEquals(len(choices), 1)
- self.assertEquals(choices[0], (option.pk, unicode(option)))
+ self.assertEqual(len(choices), 1)
+ self.assertEqual(choices[0], (option.pk, unicode(option)))
def test_callable_initial_value(self):
"The initial value for a callable default returning a queryset is the pk (refs #13769)"
obj1 = ChoiceOptionModel.objects.create(id=1, name='default')
obj2 = ChoiceOptionModel.objects.create(id=2, name='option 2')
obj3 = ChoiceOptionModel.objects.create(id=3, name='option 3')
- self.assertEquals(ChoiceFieldForm().as_p(), """<p><label for="id_choice">Choice:</label> <select name="choice" id="id_choice">
+ self.assertEqual(ChoiceFieldForm().as_p(), """<p><label for="id_choice">Choice:</label> <select name="choice" id="id_choice">
<option value="1" selected="selected">ChoiceOption 1</option>
<option value="2">ChoiceOption 2</option>
<option value="3">ChoiceOption 3</option>
@@ -67,7 +67,7 @@ class ModelFormCallableModelDefault(TestCase):
obj1 = ChoiceOptionModel.objects.create(id=1, name='default')
obj2 = ChoiceOptionModel.objects.create(id=2, name='option 2')
obj3 = ChoiceOptionModel.objects.create(id=3, name='option 3')
- self.assertEquals(ChoiceFieldForm(initial={
+ self.assertEqual(ChoiceFieldForm(initial={
'choice': obj2,
'choice_int': obj2,
'multi_choice': [obj2,obj3],