'Verify questions from inactive users aren\'t counted.'

def test_questions_inactive_user(self):

    u = UserFactory(is_active=False)
    QuestionFactory(creator=u)
    QuestionFactory(creator=u)
    r = self._get_api_result('api.kpi.questions')
    eq_(len(r['objects']), 0)
    u.is_active = True
    u.save()
    cache.clear()
    url = reverse('api.kpi.questions')
    response = self.client.get((url + '?format=json'))
    eq_(200, response.status_code)
    r = json.loads(response.content)
    eq_(r['objects'][0]['questions'], 2)
