Esempio n. 1
0
 def test_increment(self):
     test_post = PostFactory(views=10)
     current_views = test_post.views
     test_post.increment_views()
     incremented_views = test_post.views
     self.assertEqual(10, current_views)
     self.assertGreater(incremented_views, current_views)