Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a DeprecationWarning under Python 3.

  • Loading branch information...
commit 83041ca8025425530fcd32b50f247077ac0a5b74 1 parent c736a1a
@aaugustin aaugustin authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 tests/modeltests/delete/tests.py
View
12 tests/modeltests/delete/tests.py
@@ -250,7 +250,7 @@ def noop(*args, **kwargs):
self.assertNumQueries(3, a.delete)
self.assertFalse(User.objects.exists())
self.assertFalse(Avatar.objects.exists())
- self.assertEquals(len(calls), 1)
+ self.assertEqual(len(calls), 1)
models.signals.post_delete.disconnect(noop, sender=User)
@skipIfDBFeature("can_defer_constraint_checks")
@@ -275,7 +275,7 @@ def noop(*args, **kwargs):
self.assertNumQueries(4, a.delete)
self.assertFalse(User.objects.exists())
self.assertFalse(Avatar.objects.exists())
- self.assertEquals(len(calls), 1)
+ self.assertEqual(len(calls), 1)
models.signals.post_delete.disconnect(noop, sender=User)
def test_hidden_related(self):
@@ -317,7 +317,7 @@ def test_fast_delete_qs(self):
u1 = User.objects.create()
u2 = User.objects.create()
self.assertNumQueries(1, User.objects.filter(pk=u1.pk).delete)
- self.assertEquals(User.objects.count(), 1)
+ self.assertEqual(User.objects.count(), 1)
self.assertTrue(User.objects.filter(pk=u2.pk).exists())
def test_fast_delete_joined_qs(self):
@@ -327,7 +327,7 @@ def test_fast_delete_joined_qs(self):
expected_queries = 1 if connection.features.update_can_self_select else 2
self.assertNumQueries(expected_queries,
User.objects.filter(avatar__desc='a').delete)
- self.assertEquals(User.objects.count(), 1)
+ self.assertEqual(User.objects.count(), 1)
self.assertTrue(User.objects.filter(pk=u2.pk).exists())
def test_fast_delete_inheritance(self):
@@ -340,8 +340,8 @@ def test_fast_delete_inheritance(self):
# self.assertNumQueries(2, c.delete)
c.delete()
self.assertFalse(Child.objects.exists())
- self.assertEquals(Parent.objects.count(), 1)
- self.assertEquals(Parent.objects.filter(pk=p.pk).count(), 1)
+ self.assertEqual(Parent.objects.count(), 1)
+ self.assertEqual(Parent.objects.filter(pk=p.pk).count(), 1)
# 1 for self delete, 1 for fast delete of empty "child" qs.
self.assertNumQueries(2, p.delete)
self.assertFalse(Parent.objects.exists())

0 comments on commit 83041ca

Please sign in to comment.
Something went wrong with that request. Please try again.