Improve minor things in the tests

This commit is contained in:
Bastien Gérard
2019-05-26 22:17:58 +02:00
parent 24ba35d76f
commit 6e1c132ee8
5 changed files with 27 additions and 27 deletions

View File

@@ -1372,7 +1372,7 @@ class FieldTest(MongoDBTestCase):
brother = Brother(name="Bob", sibling=sister)
brother.save()
self.assertEquals(Brother.objects[0].sibling.name, sister.name)
self.assertEqual(Brother.objects[0].sibling.name, sister.name)
def test_reference_abstract_class(self):
"""Ensure that an abstract class instance cannot be used in the
@@ -2045,8 +2045,8 @@ class FieldTest(MongoDBTestCase):
Dog().save()
Fish().save()
Human().save()
self.assertEquals(Animal.objects(_cls__in=["Animal.Mammal.Dog", "Animal.Fish"]).count(), 2)
self.assertEquals(Animal.objects(_cls__in=["Animal.Fish.Guppy"]).count(), 0)
self.assertEqual(Animal.objects(_cls__in=["Animal.Mammal.Dog", "Animal.Fish"]).count(), 2)
self.assertEqual(Animal.objects(_cls__in=["Animal.Fish.Guppy"]).count(), 0)
def test_sparse_field(self):
class Doc(Document):