added unit test for addToSet
This commit is contained in:
parent
2c8f004103
commit
72c7a010ff
@ -664,6 +664,11 @@ class QuerySetTest(unittest.TestCase):
|
||||
post.reload()
|
||||
self.assertTrue('db' in post.tags and 'nosql' in post.tags)
|
||||
|
||||
BlogPost.objects.update_one(add_to_set__tags='unique')
|
||||
BlogPost.objects.update_one(add_to_set__tags='unique')
|
||||
post.reload()
|
||||
self.assertEqual(post.tags.count('unique'), 1)
|
||||
|
||||
BlogPost.drop_collection()
|
||||
|
||||
def test_update_pull(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user