Use FTS4 in fixtures

Closes #1081
This commit is contained in:
Simon Willison 2020-11-11 16:02:58 -08:00 committed by GitHub
commit e8e0a6f284
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 16 deletions

View file

@ -37,9 +37,9 @@ def test_homepage(app_client):
assert len(d["tables_and_views_truncated"]) == 5
assert d["tables_and_views_more"] is True
# 4 hidden FTS tables + no_primary_key (hidden in metadata)
assert d["hidden_tables_count"] == 5
# 201 in no_primary_key, plus 5 in other hidden tables:
assert d["hidden_table_rows_sum"] == 206
assert d["hidden_tables_count"] == 6
# 201 in no_primary_key, plus 6 in other hidden tables:
assert d["hidden_table_rows_sum"] == 207
assert d["views_count"] == 4
@ -512,7 +512,7 @@ def test_database_page(app_client):
},
{
"name": "searchable_fts",
"columns": ["text1", "text2", "name with . and spaces", "content"],
"columns": ["text1", "text2", "name with . and spaces"],
"primary_keys": [],
"count": 2,
"hidden": True,
@ -521,14 +521,8 @@ def test_database_page(app_client):
"private": False,
},
{
"name": "searchable_fts_content",
"columns": [
"docid",
"c0text1",
"c1text2",
"c2name with . and spaces",
"c3content",
],
"name": "searchable_fts_docsize",
"columns": ["docid", "size"],
"primary_keys": ["docid"],
"count": 2,
"hidden": True,
@ -563,6 +557,16 @@ def test_database_page(app_client):
"foreign_keys": {"incoming": [], "outgoing": []},
"private": False,
},
{
"name": "searchable_fts_stat",
"columns": ["id", "value"],
"primary_keys": ["id"],
"count": 1,
"hidden": True,
"fts_table": None,
"foreign_keys": {"incoming": [], "outgoing": []},
"private": False,
},
]