Get tests to pass on SQLite 3.25

pull/2478/head
Simon Willison 2025-04-16 21:38:19 -07:00
rodzic 0255ec03f7
commit 6b0cc191de
1 zmienionych plików z 25 dodań i 8 usunięć

Wyświetl plik

@ -516,14 +516,22 @@ async def test_database_page(ds_client):
"private": False,
},
{
"columns": [
"text1",
"text2",
"name with . and spaces",
"searchable_fts",
"docid",
"__langid",
],
"columns": Either(
[
"text1",
"text2",
"name with . and spaces",
"searchable_fts",
"docid",
"__langid",
],
# Get tests to pass on SQLite 3.25 as well
[
"text1",
"text2",
"name with . and spaces",
],
),
"count": 2,
"foreign_keys": {"incoming": [], "outgoing": []},
"fts_table": "searchable_fts",
@ -1192,3 +1200,12 @@ async def test_upgrade_metadata(metadata, expected_config, expected_metadata):
assert response.json() == expected_config
response2 = await ds.client.get("/-/metadata.json")
assert response2.json() == expected_metadata
class Either:
def __init__(self, a, b):
self.a = a
self.b = b
def __eq__(self, other):
return other == self.a or other == self.b