'GET requests to filtered ListCreateAPIView that have a filter_class set
should return filtered results.'

def test_get_filtered_class_root_view(self):

    view = FilterClassRootView.as_view()
    request = factory.get(u'/')
    response = view(request).render()
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    self.assertEqual(response.data, self.data)
    search_decimal = Decimal(u'4.25')
    request = factory.get(u'/', {u'decimal': (u'%s' % search_decimal)})
    response = view(request).render()
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    expected_data = [f for f in self.data if (Decimal(f[u'decimal']) < search_decimal)]
    self.assertEqual(response.data, expected_data)
    search_date = datetime.date(2012, 10, 2)
    request = factory.get(u'/', {u'date': (u'%s' % search_date)})
    response = view(request).render()
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    expected_data = [f for f in self.data if (parse_date(f[u'date']) > search_date)]
    self.assertEqual(response.data, expected_data)
    search_text = u'ff'
    request = factory.get(u'/', {u'text': (u'%s' % search_text)})
    response = view(request).render()
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    expected_data = [f for f in self.data if (search_text in f[u'text'].lower())]
    self.assertEqual(response.data, expected_data)
    search_decimal = Decimal(u'5.25')
    search_date = datetime.date(2012, 10, 2)
    request = factory.get(u'/', {u'decimal': (u'%s' % (search_decimal,)), u'date': (u'%s' % (search_date,))})
    response = view(request).render()
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    expected_data = [f for f in self.data if ((parse_date(f[u'date']) > search_date) and (Decimal(f[u'decimal']) < search_decimal))]
    self.assertEqual(response.data, expected_data)
