'Flag a question.'

def test_flag(self):

    d = {'content_type': ContentType.objects.get_for_model(Question).id, 'object_id': self.question.id, 'reason': 'spam', 'next': self.question.get_absolute_url()}
    post(self.client, 'flagit.flag', d)
    eq_(1, FlaggedObject.objects.count())
    flag = FlaggedObject.objects.all()[0]
    eq_(self.user.username, flag.creator.username)
    eq_('spam', flag.reason)
    eq_(self.question, flag.content_object)
