mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Work in progress on query view, refs #2049
This commit is contained in:
parent
40dc5f5c50
commit
026429fadd
3 changed files with 426 additions and 5 deletions
|
|
@ -1,6 +1,7 @@
|
|||
from datasette.cli import cli, serve
|
||||
from datasette.plugins import pm
|
||||
from click.testing import CliRunner
|
||||
from unittest.mock import ANY
|
||||
import textwrap
|
||||
import json
|
||||
|
||||
|
|
@ -35,11 +36,11 @@ def test_serve_with_get(tmp_path_factory):
|
|||
],
|
||||
)
|
||||
assert 0 == result.exit_code, result.output
|
||||
assert {
|
||||
"database": "_memory",
|
||||
assert json.loads(result.output) == {
|
||||
"ok": True,
|
||||
"rows": [{"sqlite_version()": ANY}],
|
||||
"truncated": False,
|
||||
"columns": ["sqlite_version()"],
|
||||
}.items() <= json.loads(result.output).items()
|
||||
}
|
||||
|
||||
# The plugin should have created hello.txt
|
||||
assert (plugins_dir / "hello.txt").read_text() == "hello"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue