'Test the exist survey results API call.'

def test_exit_survey_results(self):

    kind = MetricKindFactory(code=EXIT_SURVEY_YES_CODE)
    MetricFactory(kind=kind, start=date.today(), end=date.today(), value=1337)
    kind = MetricKindFactory(code=EXIT_SURVEY_NO_CODE)
    MetricFactory(kind=kind, start=date.today(), end=date.today(), value=42)
    kind = MetricKindFactory(code=EXIT_SURVEY_DONT_KNOW_CODE)
    MetricFactory(kind=kind, start=date.today(), end=date.today(), value=777)
    r = self._get_api_result('api.kpi.exit-survey')
    eq_(r['objects'][0]['yes'], 1337)
    eq_(r['objects'][0]['no'], 42)
    eq_(r['objects'][0]['dont_know'], 777)
