added unit test for addToSet
This commit is contained in:
		| @@ -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): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user