'Prevent posting the exact same comment twice'

def testPreventDuplicateComments(self):

    a = Article.objects.get(pk=1)
    data = self.getValidData(a)
    self.client.post(u'/post/', data)
    self.client.post(u'/post/', data)
    self.assertEqual(Comment.objects.count(), 1)
    self.client.post(u'/post/', dict(data, comment=u'My    second    comment.'))
    self.assertEqual(Comment.objects.count(), 2)
