diff --git a/django/contrib/formtools/wizard/tests/formtests.py b/django/contrib/formtools/wizard/tests/formtests.py index 6b3cc3da43..db0aba1bff 100644 --- a/django/contrib/formtools/wizard/tests/formtests.py +++ b/django/contrib/formtools/wizard/tests/formtests.py @@ -63,14 +63,14 @@ class TestWizard(WizardView): class FormTests(TestCase): def test_form_init(self): testform = TestWizard.get_initkwargs([Step1, Step2]) - self.assertEquals(testform['form_list'], {u'0': Step1, u'1': Step2}) + self.assertEqual(testform['form_list'], {u'0': Step1, u'1': Step2}) testform = TestWizard.get_initkwargs([('start', Step1), ('step2', Step2)]) - self.assertEquals( + self.assertEqual( testform['form_list'], {u'start': Step1, u'step2': Step2}) testform = TestWizard.get_initkwargs([Step1, Step2, ('finish', Step3)]) - self.assertEquals( + self.assertEqual( testform['form_list'], {u'0': Step1, u'1': Step2, u'finish': Step3}) def test_first_step(self): @@ -78,26 +78,26 @@ class FormTests(TestCase): testform = TestWizard.as_view([Step1, Step2]) response, instance = testform(request) - self.assertEquals(instance.steps.current, u'0') + self.assertEqual(instance.steps.current, u'0') testform = TestWizard.as_view([('start', Step1), ('step2', Step2)]) response, instance = testform(request) - self.assertEquals(instance.steps.current, 'start') + self.assertEqual(instance.steps.current, 'start') def test_persistence(self): testform = TestWizard.as_view([('start', Step1), ('step2', Step2)]) request = get_request({'test_wizard-current_step': 'start', 'name': 'data1'}) response, instance = testform(request) - self.assertEquals(instance.steps.current, 'start') + self.assertEqual(instance.steps.current, 'start') instance.storage.current_step = 'step2' testform2 = TestWizard.as_view([('start', Step1), ('step2', Step2)]) request.POST = {'test_wizard-current_step': 'step2'} response, instance = testform2(request) - self.assertEquals(instance.steps.current, 'step2') + self.assertEqual(instance.steps.current, 'step2') def test_form_condition(self): request = get_request() @@ -106,13 +106,13 @@ class FormTests(TestCase): [('start', Step1), ('step2', Step2), ('step3', Step3)], condition_dict={'step2': True}) response, instance = testform(request) - self.assertEquals(instance.get_next_step(), 'step2') + self.assertEqual(instance.get_next_step(), 'step2') testform = TestWizard.as_view( [('start', Step1), ('step2', Step2), ('step3', Step3)], condition_dict={'step2': False}) response, instance = testform(request) - self.assertEquals(instance.get_next_step(), 'step3') + self.assertEqual(instance.get_next_step(), 'step3') def test_form_kwargs(self): request = get_request() diff --git a/tests/regressiontests/settings_tests/tests.py b/tests/regressiontests/settings_tests/tests.py index a04f8e3556..ad42e1a5f2 100644 --- a/tests/regressiontests/settings_tests/tests.py +++ b/tests/regressiontests/settings_tests/tests.py @@ -194,7 +194,7 @@ class EnvironmentVariableTest(TestCase): # expect default setup_environ(global_settings) - self.assertEquals( + self.assertEqual( os.environ.get('DJANGO_SETTINGS_MODULE'), original_module ) @@ -203,7 +203,7 @@ class EnvironmentVariableTest(TestCase): os.environ['DJANGO_SETTINGS_MODULE'] = user_override setup_environ(global_settings) - self.assertEquals( + self.assertEqual( os.environ.get('DJANGO_SETTINGS_MODULE'), user_override ) @@ -212,7 +212,7 @@ class EnvironmentVariableTest(TestCase): os.environ['DJANGO_SETTINGS_MODULE'] = user_override setup_environ(global_settings, original_settings_path = orig_path) - self.assertEquals( + self.assertEqual( os.environ.get('DJANGO_SETTINGS_MODULE'), orig_path ) diff --git a/tests/regressiontests/views/tests/debug.py b/tests/regressiontests/views/tests/debug.py index 1dbaff490f..79af253d7c 100644 --- a/tests/regressiontests/views/tests/debug.py +++ b/tests/regressiontests/views/tests/debug.py @@ -224,7 +224,7 @@ class ExceptionReporterFilterTests(TestCase): mail.outbox = [] # Empty outbox request = self.rf.post('/some_url/', self.breakfast_data) response = view(request) - self.assertEquals(len(mail.outbox), 1) + self.assertEqual(len(mail.outbox), 1) email = mail.outbox[0] # Frames vars are never shown in plain text email reports. self.assertNotIn('cooked_eggs', email.body) @@ -244,7 +244,7 @@ class ExceptionReporterFilterTests(TestCase): mail.outbox = [] # Empty outbox request = self.rf.post('/some_url/', self.breakfast_data) response = view(request) - self.assertEquals(len(mail.outbox), 1) + self.assertEqual(len(mail.outbox), 1) email = mail.outbox[0] # Frames vars are never shown in plain text email reports. self.assertNotIn('cooked_eggs', email.body) @@ -269,7 +269,7 @@ class ExceptionReporterFilterTests(TestCase): mail.outbox = [] # Empty outbox request = self.rf.post('/some_url/', self.breakfast_data) response = view(request) - self.assertEquals(len(mail.outbox), 1) + self.assertEqual(len(mail.outbox), 1) email = mail.outbox[0] # Frames vars are never shown in plain text email reports. self.assertNotIn('cooked_eggs', email.body)