Support for :memory: databases

If you start Datasette with no files, it will connect to :memory: instead.

When starting it with files you can add --memory to also get a :memory: database.
This commit is contained in:
Simon Willison 2019-03-14 16:42:38 -07:00
commit 9743e1d91b
6 changed files with 90 additions and 33 deletions

View file

@ -65,6 +65,14 @@ def app_client():
yield from make_app_client()
@pytest.fixture(scope="session")
def app_client_no_files():
ds = Datasette([])
client = TestClient(ds.app().test_client)
client.ds = ds
yield client
@pytest.fixture(scope='session')
def app_client_shorter_time_limit():
yield from make_app_client(20)