Added test for pop operation
This commit is contained in:
parent
3297578e8d
commit
1ed9a36d0a
@ -671,6 +671,11 @@ class QuerySetTest(unittest.TestCase):
|
|||||||
post.reload()
|
post.reload()
|
||||||
self.assertTrue('db' in post.tags and 'nosql' in post.tags)
|
self.assertTrue('db' in post.tags and 'nosql' in post.tags)
|
||||||
|
|
||||||
|
tags = post.tags[:-1]
|
||||||
|
BlogPost.objects.update(pop__tags=1)
|
||||||
|
post.reload()
|
||||||
|
self.assertEqual(post.tags, tags)
|
||||||
|
|
||||||
BlogPost.drop_collection()
|
BlogPost.drop_collection()
|
||||||
|
|
||||||
def test_update_pull(self):
|
def test_update_pull(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user