add tests to increase coverage

This commit is contained in:
Erdenezul Batmunkh
2017-09-10 13:09:20 +09:00
parent 70088704e2
commit ba99190f53
2 changed files with 30 additions and 0 deletions

View File

@@ -1861,6 +1861,10 @@ class QuerySetTest(unittest.TestCase):
post = BlogPost(name="Test Post", hits=5, tags=['test'])
post.save()
BlogPost.objects.update(hits=11)
post.reload()
self.assertEqual(post.hits, 11)
BlogPost.objects.update(set__hits=10)
post.reload()
self.assertEqual(post.hits, 10)