Start datasette.json, re-add --config, rm settings.json

The first step in defining the new `datasette.json/yaml` configuration mechanism.

Refs #2093, #2143, #493
This commit is contained in:
Alex Garcia 2023-08-22 18:26:11 -07:00 committed by GitHub
commit 17ec309e14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 55 additions and 93 deletions

View file

@ -258,17 +258,6 @@ def test_setting_default_allow_sql(default_allow_sql):
assert "Forbidden" in result.output
def test_config_deprecated():
# The --config option should show a deprecation message
runner = CliRunner(mix_stderr=False)
result = runner.invoke(
cli, ["--config", "allow_download:off", "--get", "/-/settings.json"]
)
assert result.exit_code == 0
assert not json.loads(result.output)["allow_download"]
assert "will be deprecated in" in result.stderr
def test_sql_errors_logged_to_stderr():
runner = CliRunner(mix_stderr=False)
result = runner.invoke(cli, ["--get", "/_memory.json?sql=select+blah"])