summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2021-01-05 08:15:48 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2021-01-05 08:15:48 (GMT)
commit43c7cf6fcc9a2d5c4f22709377d0fa953ccf02ca (patch)
tree8d4a9356c6a69207a887311f7b180ddf780b6a95
parenta76678bfcfd40b758302c3cdca39f49af9225023 (diff)
downloadpasserelle-atreal-openads-43c7cf6fcc9a2d5c4f22709377d0fa953ccf02ca.zip
passerelle-atreal-openads-43c7cf6fcc9a2d5c4f22709377d0fa953ccf02ca.tar.gz
passerelle-atreal-openads-43c7cf6fcc9a2d5c4f22709377d0fa953ccf02ca.tar.bz2
tests: cast order_by to lists
-rw-r--r--tests/test_views.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_views.py b/tests/test_views.py
index 8162a54..9023f5a 100644
--- a/tests/test_views.py
+++ b/tests/test_views.py
@@ -138,7 +138,7 @@ def test_forwardfile_view(atreal_openads, collectivite_1, forwardfile_1, request
queryset = view.get_queryset()
assert queryset.query is not None
- assert queryset.query.order_by == ['id']
+ assert list(queryset.query.order_by) == ['id']
assert queryset.query.default_ordering
assert queryset.query.get_meta().ordering == ['-last_update_datetime']
assert queryset.ordered
@@ -146,7 +146,7 @@ def test_forwardfile_view(atreal_openads, collectivite_1, forwardfile_1, request
request_1.GET['order-by'] = '-id'
queryset = view.get_queryset()
assert queryset.query is not None
- assert queryset.query.order_by == ['-id']
+ assert list(queryset.query.order_by) == ['-id']
assert queryset.query.default_ordering
request_1.path = '/manage/atreal-openads/%s/forward-files' % atreal_openads.slug
@@ -162,7 +162,7 @@ def test_forwardfile_view(atreal_openads, collectivite_1, forwardfile_1, request
queryset = view.get_queryset()
assert queryset.query is not None
- assert queryset.query.order_by == ['id']
+ assert list(queryset.query.order_by) == ['id']
assert queryset.query.default_ordering
assert queryset.query.get_meta().ordering == ['-last_update_datetime']
assert queryset.ordered
@@ -245,7 +245,7 @@ def test_collectivite_view(atreal_openads, collectivite_1, forwardfile_1, reques
queryset = view.get_queryset()
assert queryset.query is not None
- assert queryset.query.order_by == ['id']
+ assert list(queryset.query.order_by) == ['id']
assert queryset.query.default_ordering
assert queryset.query.get_meta().ordering == ['name']
assert queryset.ordered
@@ -253,7 +253,7 @@ def test_collectivite_view(atreal_openads, collectivite_1, forwardfile_1, reques
request_1.GET['order-by'] = '-id'
queryset = view.get_queryset()
assert queryset.query is not None
- assert queryset.query.order_by == ['-id']
+ assert list(queryset.query.order_by) == ['-id']
assert queryset.query.default_ordering