Skip to content

Commit

Permalink
Fix for broken boolean settings, closes #61
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Aug 24, 2022
1 parent 57aed0f commit a56d153
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions datasette_publish_vercel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
secret = os.environ.get("DATASETTE_SECRET")
true, false = True, False
ds = Datasette(
[],
{database_files},
Expand Down
7 changes: 6 additions & 1 deletion tests/test_publish_vercel.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ def generated_app_dir(mock_run, mock_which, tmp_path_factory):
"--setting",
"sql_time_limit_ms",
"2000",
"--setting",
"allow_download",
"0",
"--crossdb",
"--generate-dir",
appdir,
Expand Down Expand Up @@ -238,14 +241,16 @@ def test_publish_vercel_generate(generated_app_dir):
secret = os.environ.get("DATASETTE_SECRET")
true, false = True, False
ds = Datasette(
[],
["test.db"],
static_mounts=static_mounts,
metadata=metadata,
secret=secret,
cors=True,
settings={"default_page_size": 10, "sql_time_limit_ms": 2000},
settings={"default_page_size": 10, "sql_time_limit_ms": 2000, "allow_download": false},
crossdb=True
)
asyncio.run(ds.invoke_startup())
Expand Down

0 comments on commit a56d153

Please sign in to comment.