Author: jezdez Date: 2011-05-07 10:05:06 -0700 (Sat, 07 May 2011) New Revision: 16179
Modified: django/trunk/django/contrib/flatpages/tests/middleware.py django/trunk/django/contrib/flatpages/tests/views.py django/trunk/tests/regressiontests/templates/custom.py Log: Minor renaming for consistency. Modified: django/trunk/django/contrib/flatpages/tests/middleware.py =================================================================== --- django/trunk/django/contrib/flatpages/tests/middleware.py 2011-05-07 16:59:33 UTC (rev 16178) +++ django/trunk/django/contrib/flatpages/tests/middleware.py 2011-05-07 17:05:06 UTC (rev 16179) @@ -82,7 +82,7 @@ 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, "<p>Isn't it special!</p>") @@ -121,7 +121,7 @@ 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 @@ 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 @@ fp.sites.add(1) response = self.client.get('/') - self.assertEquals(response.status_code, 200) + self.assertEqual(response.status_code, 200) self.assertContains(response, "<p>Root</p>") Modified: django/trunk/django/contrib/flatpages/tests/views.py =================================================================== --- django/trunk/django/contrib/flatpages/tests/views.py 2011-05-07 16:59:33 UTC (rev 16178) +++ django/trunk/django/contrib/flatpages/tests/views.py 2011-05-07 17:05:06 UTC (rev 16179) @@ -110,17 +110,17 @@ 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" Modified: django/trunk/tests/regressiontests/templates/custom.py =================================================================== --- django/trunk/tests/regressiontests/templates/custom.py 2011-05-07 16:59:33 UTC (rev 16178) +++ django/trunk/tests/regressiontests/templates/custom.py 2011-05-07 17:05:06 UTC (rev 16179) @@ -59,19 +59,19 @@ 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 @@ """ 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 @@ """ 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}) -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.