def test_bad_sort_field(self):
        req = RequestFactory().get(
            "/a/url", {"sortfield": "foo", "sortdirection": "asc"})
        from moztrap.model.core.models import Product  # has no "foo" field

        qs = Product.objects.all()
        res = self.on_template_response({"ctx_name": qs}, request=req)

        self.assertEqual(list(res.context_data["ctx_name"]), [])
:rtype: endpoint
dataset/ETHPy150Open mozilla/moztrap/tests/view/lists/test_sort.py/SortDecoratorTest.test_bad_sort_field--crossover with--dataset/ETHPy150Open zbyte64/django-hyperadmin/hyperadmin/endpoints.py/BaseEndpoint.fork_state