mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
First working -d based Datasette Library
Refs #417 First proof-of-concept for Datasette Library. Run like this: datasette -d ~/Library Uses a new plugin hook - available_databases() BUT... I don't think this is quite the way I want to go.
This commit is contained in:
parent
9c46f2f21f
commit
947645d847
15 changed files with 201 additions and 18 deletions
|
|
@ -9,7 +9,6 @@ def test_inspect_cli(app_client):
|
|||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ["inspect", "fixtures.db"])
|
||||
data = json.loads(result.output)
|
||||
assert ["fixtures"] == list(data.keys())
|
||||
database = data["fixtures"]
|
||||
assert "fixtures.db" == database["file"]
|
||||
assert isinstance(database["hash"], str)
|
||||
|
|
@ -28,7 +27,7 @@ def test_inspect_cli_writes_to_file(app_client):
|
|||
)
|
||||
assert 0 == result.exit_code, result.output
|
||||
data = json.load(open("foo.json"))
|
||||
assert ["fixtures"] == list(data.keys())
|
||||
assert {"fixtures", "special"} == set(data.keys())
|
||||
|
||||
|
||||
def test_serve_with_inspect_file_prepopulates_table_counts_cache():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue