test(sorting): drop unused imports/var in test_sorting (#68)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
"""Tests for the list-view sorting system (games/sorting.py)."""
|
"""Tests for the list-view sorting system (games/sorting.py)."""
|
||||||
|
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime
|
||||||
from zoneinfo import ZoneInfo
|
from zoneinfo import ZoneInfo
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
@@ -8,7 +8,7 @@ from django.conf import settings
|
|||||||
from django.test import RequestFactory
|
from django.test import RequestFactory
|
||||||
|
|
||||||
from games.filters import FindFilter
|
from games.filters import FindFilter
|
||||||
from games.models import Game, Platform, Purchase, Session
|
from games.models import Game, Platform, Session
|
||||||
from games.sorting import (
|
from games.sorting import (
|
||||||
GAME_DEFAULT_SORT,
|
GAME_DEFAULT_SORT,
|
||||||
GAME_SORTS,
|
GAME_SORTS,
|
||||||
@@ -116,6 +116,7 @@ class TestApplySortGames:
|
|||||||
assert list(result.queryset)[0] == alpha # most playtime first
|
assert list(result.queryset)[0] == alpha # most playtime first
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class TestParseFindFilter:
|
class TestParseFindFilter:
|
||||||
def test_reads_sort_param(self):
|
def test_reads_sort_param(self):
|
||||||
request = RequestFactory().get("/x", {"sort": "-playtime,name"})
|
request = RequestFactory().get("/x", {"sort": "-playtime,name"})
|
||||||
|
|||||||
Reference in New Issue
Block a user