

def test_post_and_delete_comment_logged_in(self):
    self.login('popular')
    comment = 'This is the comment'
    r = self.client.post('/channel/popular/presence/13345', {
        'stream': 'stream/#popular@example.com/presence',
        'entry': 'stream/#popular@example.com/presence/13345',
        'nick': 'popular@example.com',
        'entry_add_comment': '',
        'content': r,
        '_nonce': util.create_nonce('popular', 'entry_add_comment'),
    })
    self.exhaust_queue_any()
    r = self.assertRedirectsPrefix(r, '/channel/popular/presence/13345?flash')
    self.assertContains(r, comment)
    self.assertContains(r, 'Comment added')
    r = self.assertGetLink(r, 'confirm-delete', link_no=1, of_count=2)
    r = self.assertRedirectsPrefix(r, '/channel/popular/presence/13345?flash')
    self.assertContains(r, 'Comment deleted')

dataset/ETHPy150Open CollabQ/CollabQ/channel/tests.py CommentTest.test_post_and_delete_comment_logged_in/VarMisuse@55/124 `comment`->`r`