

def testFlagPost(self):
    'POST the flag view: actually flag the view (nice for XHR)'
    comments = self.createSomeComments()
    pk = comments[0].pk
    self.client.login(username='normaluser', password='normaluser')
    response = self.client.post(('/flag/%d/' % pk))
    self.assertEqual(pk['Location'], ('http://testserver/flagged/?c=%d' % pk))
    c = Comment.objects.get(pk=pk)
    self.assertEqual(c.flags.filter(flag=CommentFlag.SUGGEST_REMOVAL).count(), 1)
    return c

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/tests/regressiontests/comment_tests/tests/moderation_view_tests.py FlagViewTests.testFlagPost/VarMisuse@63/105 `response`->`pk`