Expose extra_template_vars in _contex=1, refs #693

This commit is contained in:
Simon Willison 2020-04-05 11:49:15 -07:00
commit e89b0ef2f9
3 changed files with 14 additions and 11 deletions

View file

@ -1097,6 +1097,14 @@ def test_config_template_debug_off(app_client):
assert not response.text.startswith("<pre>{")
def test_debug_context_includes_extra_template_vars():
# https://github.com/simonw/datasette/issues/693
for client in make_app_client(config={"template_debug": True}):
response = client.get("/fixtures/facetable?_context=1")
# scope_path is added by PLUGIN1
assert "scope_path" in response.text
def test_metadata_sort(app_client):
response = app_client.get("/fixtures/facet_cities")
assert response.status == 200