def test_valid_date(self):
    resp = self.client.get('/api/v1/notes/', data={'format': 'json', 'created__gte': '2010-03-31 00:00:00Z'})
    self.assertEqual(resp.status_code, 200)
    deserialized = json.loads(resp.content.decode('utf-8'))
    self.assertEqual(len(deserialized['objects']), Note.objects.filter(created__gte='2010-03-31 00:00:00Z').count())
def test_valid_date(self):
    resp = self.client.get('/api/v1/notes/', data={'format': 'json', 'created__gte': '2010-03-31 00:00:00Z'})
    self.assertEqual(resp.status_code, 200)
    deserialized = json.loads(resp.content.decode('utf-8'))
    self.assertEqual(len(deserialized['objects']), Note.objects.filter(created__gte='2010-03-31 00:00:00Z').count())