

def testWillBePostedSignal(self):
    '\n        Test that the comment_will_be_posted signal can prevent the comment from\n        actually getting saved\n        '

    def receive(sender, **kwargs):
        return False
    signals.comment_will_be_posted.connect(receive)
    a = Article.objects.get(pk=1)
    data = self.getValidData(a)
    response = self.client.post('/post/', data)
    self.assertEqual(a.status_code, 400)
    self.assertEqual(Comment.objects.count(), 0)

dataset/ETHPy150Open dcramer/django-compositepks/tests/regressiontests/comment_tests/tests/comment_view_tests.py CommentViewTests.testWillBePostedSignal/VarMisuse@76/132 `response`->`a`