'Test the default API call (no filtering).'

def test_default(self):

    today = date.today()
    for i in range(10):
        WikiMetricFactory(code=METRIC_CODE_CHOICES[(i % len(METRIC_CODE_CHOICES))][0], date=(today - timedelta(days=i)), value=i)
    response = self.client.get(urlparams(reverse('api.wikimetric_list'), format='json'))
    eq_(200, response.status_code)
    results = json.loads(response.content)['results']
    eq_(10, len(results))
    for i in range(10):
        result = results[i]
        eq_(i, result['value'])
        eq_(METRIC_CODE_CHOICES[(i % len(METRIC_CODE_CHOICES))][0], result['code'])
        eq_(str((today - timedelta(days=i))), result['date'])
