'Try and vote on `q`. If `ignored` is false, assert the
request worked. If `ignored` is True, assert the request didn\'t
do anything.'

def _check_question_vote(self, q, ignored):

    url = reverse('questions.vote', args=[q.id], locale='en-US')
    votes = QuestionVote.objects.filter(question=q).count()
    res = self.client.post(url, HTTP_X_REQUESTED_WITH='XMLHttpRequest')
    eq_(res.status_code, 200)
    data = json.loads(res.content)
    eq_(data.get('ignored', False), ignored)
    if ignored:
        eq_(QuestionVote.objects.filter(question=q).count(), votes)
    else:
        eq_(QuestionVote.objects.filter(question=q).count(), (votes + 1))
