Added test for pop operation

This commit is contained in:
Harry Marr 2010-08-30 14:02:02 +01:00
parent 3297578e8d
commit 1ed9a36d0a

View File

@ -671,6 +671,11 @@ class QuerySetTest(unittest.TestCase):
post.reload()
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()
def test_update_pull(self):