Test is no longer order dependent, closes #1123

pull/1128/head
Simon Willison 2020-12-02 16:49:43 -08:00
rodzic a45a3dff3e
commit 13c960c03b
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -797,9 +797,11 @@ def test_hook_table_actions(app_client, table_or_view):
assert get_table_actions_links(response.text) == []
response_2 = app_client.get(f"/fixtures/{table_or_view}?_bot=1")
assert get_table_actions_links(response_2.text) == [
{"label": "From async", "href": "/"},
assert sorted(
get_table_actions_links(response_2.text), key=lambda l: l["label"]
) == [
{"label": "Database: fixtures", "href": "/"},
{"label": "From async", "href": "/"},
{"label": f"Table: {table_or_view}", "href": "/"},
]