

def testCommentPreview(self):
    a = Article.objects.get(pk=1)
    data = self.getValidData(a)
    data['preview'] = 'Preview'
    response = self.client.post('/post/', data)
    self.assertEqual(response.status_code, 200)
    self.assertTemplateUsed(response, 'comments/preview.html')

dataset/ETHPy150Open dcramer/django-compositepks/tests/regressiontests/comment_tests/tests/comment_view_tests.py CommentViewTests.testCommentPreview/original