mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
add_memory_database(memory_name, name=None, route=None)
This commit is contained in:
parent
257e1c1b1b
commit
1df4028d78
3 changed files with 10 additions and 6 deletions
|
|
@ -15,7 +15,7 @@ async def datasette_with_permissions():
|
|||
"""A datasette instance with permission restrictions for testing"""
|
||||
ds = Datasette(config={"databases": {"test_db": {"allow": {"id": "admin"}}}})
|
||||
await ds.invoke_startup()
|
||||
db = ds.add_memory_database("test_db")
|
||||
db = ds.add_memory_database("test_datasette_with_permissions", name="test_db")
|
||||
await db.execute_write(
|
||||
"create table if not exists test_table (id integer primary key, name text)"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue