Skip to content

Commit

Permalink
Removed usage of deprecated assertEquals().
Browse files Browse the repository at this point in the history
  • Loading branch information
timgraham committed Jan 21, 2016
1 parent 249caed commit 664e626
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions fundraising/tests/test_views.py
Expand Up @@ -165,7 +165,7 @@ def test_submitting_donation_form_valid(self, make_donation):
'receipt_email': 'django@example.com',
})
content = json.loads(response.content.decode())
self.assertEquals(200, response.status_code)
self.assertEqual(response.status_code, 200)
self.assertTrue(content['success'])
self.assertEqual(content['redirect'], donation.get_absolute_url())

Expand All @@ -190,7 +190,7 @@ def test_cancel_already_cancelled_donation(self, retrieve_customer):
donation = Donation.objects.create(donor=donor, stripe_subscription_id='')
url = reverse('fundraising:cancel-donation', kwargs={'hero': donor.id})
response = self.client.post(url, {'donation': donation.id})
self.assertEquals(404, response.status_code)
self.assertEqual(response.status_code, 404)
self.assertFalse(retrieve_customer.called)


Expand Down
4 changes: 2 additions & 2 deletions releases/tests.py
Expand Up @@ -23,8 +23,8 @@ def test_legacy_redirects(self):
location = response.get('Location', '')
if location.startswith('http://testserver'):
location = location[17:]
self.assertEquals(location, new_path)
self.assertEquals(response.status_code, 301)
self.assertEqual(location, new_path)
self.assertEqual(response.status_code, 301)


class TestTemplateTags(TestCase):
Expand Down
8 changes: 4 additions & 4 deletions svntogit/tests.py
Expand Up @@ -6,13 +6,13 @@ class SvnToGitTests(TestCase):
def test_redirect(self):
response = self.client.get('/svntogit/1/', follow=False)
target = 'https://github.com/django/django/commit/d6ded0e91b'
self.assertEquals(response.status_code, 301)
self.assertEquals(response['Location'], target)
self.assertEqual(response.status_code, 301)
self.assertEqual(response['Location'], target)

def test_redirect_empty_changeset(self):
response = self.client.get('/svntogit/7/')
self.assertEquals(response.status_code, 404)
self.assertEqual(response.status_code, 404)

def test_redirect_non_existing_changeset(self):
response = self.client.get('/svntogit/20000/')
self.assertEquals(response.status_code, 404)
self.assertEqual(response.status_code, 404)

0 comments on commit 664e626

Please sign in to comment.