mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
parent
abcf022249
commit
cefd058c1c
9 changed files with 14 additions and 2460 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from datasette.plugins import DEFAULT_PLUGINS
|
||||
from datasette.utils import detect_json1
|
||||
from datasette.version import __version__
|
||||
from .fixtures import ( # noqa
|
||||
app_client,
|
||||
app_client_no_files,
|
||||
|
|
@ -1290,6 +1291,7 @@ def test_versions_json(app_client):
|
|||
assert "full" in response.json["python"]
|
||||
assert "datasette" in response.json
|
||||
assert "version" in response.json["datasette"]
|
||||
assert response.json["datasette"]["version"] == __version__
|
||||
assert "sqlite" in response.json
|
||||
assert "version" in response.json["sqlite"]
|
||||
assert "fts_versions" in response.json["sqlite"]
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ from .fixtures import (
|
|||
)
|
||||
from datasette.plugins import DEFAULT_PLUGINS
|
||||
from datasette.cli import cli, serve
|
||||
from datasette.version import __version__
|
||||
from click.testing import CliRunner
|
||||
import io
|
||||
import json
|
||||
|
|
@ -156,3 +157,9 @@ def test_uninstall(run_module):
|
|||
runner.invoke(cli, ["uninstall", "datasette-mock-plugin", "-y"])
|
||||
run_module.assert_called_once_with("pip", run_name="__main__")
|
||||
assert sys.argv == ["pip", "uninstall", "datasette-mock-plugin", "-y"]
|
||||
|
||||
|
||||
def test_version():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ["--version"])
|
||||
assert result.output == "cli, version {}\n".format(__version__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue