mirror of
https://github.com/simonw/datasette.git
synced 2026-06-06 00:56:57 +02:00
Refactor hidden_table_names() to use new implemenatation
Refs https://github.com/simonw/datasette/pull/2749#issuecomment-4565727978
This commit is contained in:
parent
bcd989f4f8
commit
aaf00e9ec2
4 changed files with 43 additions and 87 deletions
|
|
@ -8,7 +8,7 @@ from datasette.app import Datasette
|
|||
from datasette.database import Database, Results, MultipleValues
|
||||
from datasette.database import DatasetteClosedError
|
||||
from datasette.database import _deliver_write_result
|
||||
from datasette.utils.sqlite import sqlite3, sqlite_version
|
||||
from datasette.utils.sqlite import sqlite3
|
||||
from datasette.utils import Column
|
||||
import pytest
|
||||
import time
|
||||
|
|
@ -798,14 +798,7 @@ async def test_in_memory_databases_forbid_writes(app_client):
|
|||
assert await db.table_names() == ["foo"]
|
||||
|
||||
|
||||
def pragma_table_list_supported():
|
||||
return sqlite_version()[1] >= 37
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.skipif(
|
||||
not pragma_table_list_supported(), reason="Requires PRAGMA table_list support"
|
||||
)
|
||||
async def test_hidden_tables(app_client):
|
||||
ds = app_client.ds
|
||||
db = ds.add_database(Database(ds, is_memory=True, is_mutable=True))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue