Permalink
Browse files

added unit test for addToSet

  • Loading branch information...
1 parent 2c8f004 commit 72c7a010ff6d782d850c245deee1857f87b9a1f4 sib committed Sep 30, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 tests/queryset.py
View
@@ -664,6 +664,11 @@ class BlogPost(Document):
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):

0 comments on commit 72c7a01

Please sign in to comment.