Added test for unsetting fields
This commit is contained in:
parent
c6058fafed
commit
cec8b67b08
1 changed files with 5 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue