Add clear comment and tests for positional push #1565

This commit is contained in:
Erdenezul Batmunkh
2017-07-31 18:32:34 +08:00
parent 433f10ef93
commit 34fca9d6f5
3 changed files with 24 additions and 17 deletions

View File

@@ -1913,8 +1913,7 @@ class QuerySetTest(unittest.TestCase):
BlogPost.drop_collection()
post = BlogPost(slug="test")
post.save()
post = BlogPost.objects.create(slug="test")
BlogPost.objects.filter(id=post.id).update(push__tags="code")
BlogPost.objects.filter(id=post.id).update(push__tags__0=["mongodb", "python"])