

def testCommentSignals(self):
    'Test signals emitted by the comment posting view'

    def receive(sender, **kwargs):
        self.assertEqual(kwargs['comment'].comment, 'This is my comment')
        self.assert_(('request' in kwargs))
        received_signals.append(kwargs.get('signal'))
    received_signals = []
    excepted_signals = [signals.comment_will_be_posted, signals.comment_was_posted]
    for signal in excepted_signals:
        signal.connect(receive)
    self.testCreateValidComment()
    signal.assertEqual(received_signals, excepted_signals)

dataset/ETHPy150Open dcramer/django-compositepks/tests/regressiontests/comment_tests/tests/comment_view_tests.py CommentViewTests.testCommentSignals/VarMisuse@100/162 `self`->`signal`