diff --git a/django/contrib/flatpages/tests/middleware.py b/django/contrib/flatpages/tests/middleware.py index 01a9b355d7..57433a5028 100644 --- a/django/contrib/flatpages/tests/middleware.py +++ b/django/contrib/flatpages/tests/middleware.py @@ -82,7 +82,7 @@ class FlatpageMiddlewareTests(TestCase): fp.sites.add(1) response = self.client.get('/some.very_special~chars-here/') - self.assertEquals(response.status_code, 200) + self.assertEqual(response.status_code, 200) self.assertContains(response, "
Isn't it special!
") @@ -121,7 +121,7 @@ class FlatpageMiddlewareAppendSlashTests(TestCase): def test_redirect_view_non_existent_flatpage(self): "A non-existent flatpage raises 404 when served through a view and should not add a slash" response = self.client.get('/flatpage_root/no_such_flatpage') - self.assertEquals(response.status_code, 404) + self.assertEqual(response.status_code, 404) def test_redirect_fallback_flatpage(self): "A flatpage can be served by the fallback middlware and should add a slash" @@ -131,7 +131,7 @@ class FlatpageMiddlewareAppendSlashTests(TestCase): def test_redirect_fallback_non_existent_flatpage(self): "A non-existent flatpage raises a 404 when served by the fallback middlware and should not add a slash" response = self.client.get('/no_such_flatpage') - self.assertEquals(response.status_code, 404) + self.assertEqual(response.status_code, 404) def test_redirect_fallback_flatpage_special_chars(self): "A flatpage with special chars in the URL can be served by the fallback middleware and should add a slash" @@ -159,7 +159,7 @@ class FlatpageMiddlewareAppendSlashTests(TestCase): fp.sites.add(1) response = self.client.get('/') - self.assertEquals(response.status_code, 200) + self.assertEqual(response.status_code, 200) self.assertContains(response, "Root
") diff --git a/django/contrib/flatpages/tests/views.py b/django/contrib/flatpages/tests/views.py index 54ab52ab7e..8bc7544170 100644 --- a/django/contrib/flatpages/tests/views.py +++ b/django/contrib/flatpages/tests/views.py @@ -110,17 +110,17 @@ class FlatpageViewAppendSlashTests(TestCase): def test_redirect_view_non_existent_flatpage(self): "A non-existent flatpage raises 404 when served through a view and should not add a slash" response = self.client.get('/flatpage_root/no_such_flatpage') - self.assertEquals(response.status_code, 404) + self.assertEqual(response.status_code, 404) def test_redirect_fallback_flatpage(self): "A fallback flatpage won't be served if the middleware is disabled and should not add a slash" response = self.client.get('/flatpage') - self.assertEquals(response.status_code, 404) + self.assertEqual(response.status_code, 404) def test_redirect_fallback_non_existent_flatpage(self): "A non-existent flatpage won't be served if the fallback middlware is disabled and should not add a slash" response = self.client.get('/no_such_flatpage') - self.assertEquals(response.status_code, 404) + self.assertEqual(response.status_code, 404) def test_redirect_view_flatpage_special_chars(self): "A flatpage with special chars in the URL can be served through a view and should add a slash" diff --git a/tests/regressiontests/templates/custom.py b/tests/regressiontests/templates/custom.py index 3ce4d99547..ec3e9dc179 100644 --- a/tests/regressiontests/templates/custom.py +++ b/tests/regressiontests/templates/custom.py @@ -59,19 +59,19 @@ class CustomTagTests(TestCase): c = template.Context({'value': 42}) t = template.Template('{% load custom %}{% inclusion_no_params %}') - self.assertEquals(t.render(c), u'inclusion_no_params - Expected result\n') + self.assertEqual(t.render(c), u'inclusion_no_params - Expected result\n') t = template.Template('{% load custom %}{% inclusion_one_param 37 %}') - self.assertEquals(t.render(c), u'inclusion_one_param - Expected result: 37\n') + self.assertEqual(t.render(c), u'inclusion_one_param - Expected result: 37\n') t = template.Template('{% load custom %}{% inclusion_explicit_no_context 37 %}') - self.assertEquals(t.render(c), u'inclusion_explicit_no_context - Expected result: 37\n') + self.assertEqual(t.render(c), u'inclusion_explicit_no_context - Expected result: 37\n') t = template.Template('{% load custom %}{% inclusion_no_params_with_context %}') - self.assertEquals(t.render(c), u'inclusion_no_params_with_context - Expected result (context value: 42)\n') + self.assertEqual(t.render(c), u'inclusion_no_params_with_context - Expected result (context value: 42)\n') t = template.Template('{% load custom %}{% inclusion_params_and_context 37 %}') - self.assertEquals(t.render(c), u'inclusion_params_and_context - Expected result (context value: 42): 37\n') + self.assertEqual(t.render(c), u'inclusion_params_and_context - Expected result (context value: 42): 37\n') def test_inclusion_tag_registration(self): # Test that the decorators preserve the decorated function's docstring, name and attributes. @@ -88,10 +88,10 @@ class CustomTagTests(TestCase): """ c = template.Context({}) t = template.Template('{% load custom %}{% inclusion_tag_current_app %}') - self.assertEquals(t.render(c).strip(), u'None') + self.assertEqual(t.render(c).strip(), u'None') c.current_app = 'advanced' - self.assertEquals(t.render(c).strip(), u'advanced') + self.assertEqual(t.render(c).strip(), u'advanced') def test_15070_use_l10n(self): """ @@ -100,10 +100,10 @@ class CustomTagTests(TestCase): """ c = template.Context({}) t = template.Template('{% load custom %}{% inclusion_tag_use_l10n %}') - self.assertEquals(t.render(c).strip(), u'None') + self.assertEqual(t.render(c).strip(), u'None') c.use_l10n = True - self.assertEquals(t.render(c).strip(), u'True') + self.assertEqual(t.render(c).strip(), u'True') def test_assignment_tags(self): c = template.Context({'value': 42})