-
-
Notifications
You must be signed in to change notification settings - Fork 813
Closed
Labels
Description
I'm annoyed that it keeps on intermittently failing. I think it may be a FTS4 thing, at this point I'm fine ditching it for FTS5 instead.
datasette/tests/test_table_api.py
Lines 447 to 478 in 3b4c7e1
| @pytest.mark.parametrize( | |
| "table_metadata,querystring,expected_rows", | |
| [ | |
| ( | |
| {}, | |
| "_search=te*+AND+do*", | |
| [], | |
| ), | |
| ( | |
| {"searchmode": "raw"}, | |
| "_search=te*+AND+do*", | |
| _SEARCHMODE_RAW_RESULTS, | |
| ), | |
| ( | |
| {}, | |
| "_search=te*+AND+do*&_searchmode=raw", | |
| _SEARCHMODE_RAW_RESULTS, | |
| ), | |
| # Can be over-ridden with _searchmode=escaped | |
| ( | |
| {"searchmode": "raw"}, | |
| "_search=te*+AND+do*&_searchmode=escaped", | |
| [], | |
| ), | |
| ], | |
| ) | |
| def test_searchmode(table_metadata, querystring, expected_rows): | |
| with make_app_client( | |
| metadata={"databases": {"fixtures": {"tables": {"searchable": table_metadata}}}} | |
| ) as client: | |
| response = client.get("/fixtures/searchable.json?_shape=arrays&" + querystring) | |
| assert expected_rows == response.json["rows"] |
Reactions are currently unavailable