Skip to content

Commit

Permalink
Fix tests_functional
Browse files Browse the repository at this point in the history
  • Loading branch information
matyldv committed Oct 22, 2024
1 parent 1fda295 commit b0b5863
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ralph/admin/tests/tests_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from ralph.admin.views.extra import RalphDetailView, RalphListView
from ralph.admin.views.main import RalphChangeList
from ralph.tests.admin import CarAdmin, ManufacturerAdmin
from ralph.tests.factories import UserFactory
from ralph.tests.mixins import ClientMixin, ReloadUrlsMixin
from ralph.tests.models import Car, Foo, TestManufacturer

Expand Down Expand Up @@ -254,13 +255,14 @@ def _change_list_factory(
model=model,
model_admin=model_admin(model, ralph_site),
request=request,
sortable_by=[],
sortable_by=model_admin.sortable_by,
)

def _get_ordering_list(self, model, model_admin, params, list_display):
from django.contrib.admin.views.main import ORDER_VAR
get_params = '{}={}'.format(ORDER_VAR, '.'.join(map(str, params)))
request = RequestFactory().get('/?' + get_params)
request.user = UserFactory()
cl = self._change_list_factory(
model=Car,
model_admin=CarAdmin,
Expand Down

0 comments on commit b0b5863

Please sign in to comment.