Unit test for _table custom template, refs #521

This commit is contained in:
Simon Willison 2019-07-02 20:06:22 -07:00
commit 13e4f9a676
3 changed files with 18 additions and 0 deletions

View file

@ -101,6 +101,7 @@ def make_app_client(
extra_databases=None,
inspect_data=None,
static_mounts=None,
template_dir=None,
):
with tempfile.TemporaryDirectory() as tmpdir:
filepath = os.path.join(tmpdir, filename)
@ -143,6 +144,7 @@ def make_app_client(
config=config,
inspect_data=inspect_data,
static_mounts=static_mounts,
template_dir=template_dir,
)
ds.sqlite_functions.append(("sleep", 1, lambda n: time.sleep(float(n))))
client = TestClient(ds.app())