_sort= works even if sort column not selected, closes #1773

This commit is contained in:
Simon Willison 2022-08-14 08:44:02 -07:00
commit df4fd2d7dd
2 changed files with 23 additions and 1 deletions

View file

@ -288,6 +288,8 @@ def test_paginate_compound_keys_with_extra_filters(app_client):
),
# text column contains '$null' - ensure it doesn't confuse pagination:
("_sort=text", lambda row: row["text"], "sorted by text"),
# Still works if sort column removed using _col=
("_sort=text&_col=content", lambda row: row["text"], "sorted by text"),
],
)
def test_sortable(app_client, query_string, sort_key, human_description_en):