'Valid search fields should be (\'name\', \'task\')'

def test_for_valid_search_fields(self):

    search_fields = self.pt_admin.search_fields
    self.assertEqual(search_fields, (u'name', u'task'))
    for fieldname in search_fields:
        query = (u'%s__icontains' % fieldname)
        kwargs = {query: u'Queen'}
        self.assertEquals(PeriodicTask.objects.filter(**kwargs).count(), 0)
