Added test for unsetting fields
This commit is contained in:
parent
c6058fafed
commit
cec8b67b08
@ -779,6 +779,11 @@ class QuerySetTest(unittest.TestCase):
|
||||
post.reload()
|
||||
self.assertEqual(post.tags.count('unique'), 1)
|
||||
|
||||
self.assertNotEqual(post.hits, None)
|
||||
BlogPost.objects.update_one(unset__hits=1)
|
||||
post.reload()
|
||||
self.assertEqual(post.hits, None)
|
||||
|
||||
BlogPost.drop_collection()
|
||||
|
||||
def test_update_pull(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user