'Ensure incorrect lookup parameters are handled gracefully.'

def testIncorrectLookupParameters(self):

    response = self.client.get((u'/test_admin/%s/admin_views/thing/' % self.urlbit), {u'notarealfield': u'5'})
    self.assertRedirects(response, (u'/test_admin/%s/admin_views/thing/?e=1' % self.urlbit))
    response = self.client.get((u'/test_admin/%s/admin_views/thing/' % self.urlbit), {u'notarealfield__whatever': u'5'})
    self.assertRedirects(response, (u'/test_admin/%s/admin_views/thing/?e=1' % self.urlbit))
    response = self.client.get((u'/test_admin/%s/admin_views/thing/' % self.urlbit), {u'color__id__exact': u'StringNotInteger!'})
    self.assertRedirects(response, (u'/test_admin/%s/admin_views/thing/?e=1' % self.urlbit))
    response = self.client.get((u'/test_admin/%s/admin_views/thing/' % self.urlbit), {u'pub_date__gte': u'foo'})
    self.assertRedirects(response, (u'/test_admin/%s/admin_views/thing/?e=1' % self.urlbit))
