def test_default_order_form_valid(self):
        data = {"city": "N"}
        view = setup_view(
            views.FilteredListView(
                model=self.QueryModel,
                form_class=self.Form,
                default_order='last_name'),
            RequestFactory().get('/fake', data))

        view.form.is_valid()
        queryset = view.form_valid(view.form)
        self.assertEqual(queryset.query.order_by, ['last_name'])
Queryset is ordered by default_order when no order_by in request.
dataset/ETHPy150Open peopledoc/django-generic-filters/django_genericfilters/tests/views.py/FilteredViewTestCase.test_default_order_form_valid