Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed naming of test methods for the sake of consistency.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3d970762af059656aba487d3ff4281adf578130f 1 parent b5e7eab
Jannis Leidel jezdez authored
18 django/contrib/formtools/wizard/tests/formtests.py
View
@@ -63,14 +63,14 @@ def get_form_kwargs(self, step, *args, **kwargs):
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 @@ def test_first_step(self):
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 @@ def test_form_condition(self):
[('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()
6 tests/regressiontests/settings_tests/tests.py
View
@@ -194,7 +194,7 @@ def test_env_var_used(self):
# expect default
setup_environ(global_settings)
- self.assertEquals(
+ self.assertEqual(
os.environ.get('DJANGO_SETTINGS_MODULE'),
original_module
)
@@ -203,7 +203,7 @@ def test_env_var_used(self):
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 @@ def test_env_var_used(self):
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
)
6 tests/regressiontests/views/tests/debug.py
View
@@ -224,7 +224,7 @@ def verify_unsafe_email(self, view):
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 @@ def verify_safe_email(self, view):
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 @@ def verify_paranoid_email(self, view):
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)
Please sign in to comment.
Something went wrong with that request. Please try again.