--get now calls startup() plugin hooks, closes #934

This commit is contained in:
Simon Willison 2020-08-15 13:38:15 -07:00
commit 45414f8412
4 changed files with 59 additions and 21 deletions

View file

@ -50,20 +50,6 @@ def test_serve_with_inspect_file_prepopulates_table_counts_cache():
assert {"hithere": 44} == db.cached_table_counts
def test_serve_with_get():
runner = CliRunner()
result = runner.invoke(
cli,
["serve", "--memory", "--get", "/:memory:.json?sql=select+sqlite_version()"],
)
assert 0 == result.exit_code, result.output
assert {
"database": ":memory:",
"truncated": False,
"columns": ["sqlite_version()"],
}.items() <= json.loads(result.output).items()
def test_spatialite_error_if_attempt_to_open_spatialite():
runner = CliRunner()
result = runner.invoke(