mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fixed test I broke in #863
This commit is contained in:
parent
c5916cbffb
commit
1a5b7d318f
2 changed files with 3 additions and 4 deletions
|
|
@ -17,7 +17,7 @@ Changelog
|
||||||
- Respect existing ``scope["actor"]`` if already set by ASGI middleware. (`#854 <https://github.com/simonw/datasette/issues/854>`__)
|
- Respect existing ``scope["actor"]`` if already set by ASGI middleware. (`#854 <https://github.com/simonw/datasette/issues/854>`__)
|
||||||
- New process for shipping :ref:`contributing_alpha_beta`. (`#807 <https://github.com/simonw/datasette/issues/807>`__)
|
- New process for shipping :ref:`contributing_alpha_beta`. (`#807 <https://github.com/simonw/datasette/issues/807>`__)
|
||||||
- Re-arranged plugins documentation into :ref:`plugins`, :ref:`writing_plugins`, :ref:`plugin_hooks` and a new section on :ref:`testing_plugins`. (`#687 <https://github.com/simonw/datasette/issues/687>`__)
|
- Re-arranged plugins documentation into :ref:`plugins`, :ref:`writing_plugins`, :ref:`plugin_hooks` and a new section on :ref:`testing_plugins`. (`#687 <https://github.com/simonw/datasette/issues/687>`__)
|
||||||
- ``{{ csrftoken() }}`` now works when plugins render a template using ``datasette.render_template()``. (`#863 <https://github.com/simonw/datasette/issues/863>`__)
|
- ``{{ csrftoken() }}`` now works when plugins render a template using ``datasette.render_template(..., request=request)``. (`#863 <https://github.com/simonw/datasette/issues/863>`__)
|
||||||
|
|
||||||
.. _v0_44:
|
.. _v0_44:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -580,9 +580,8 @@ def test_register_routes_post(app_client):
|
||||||
assert "post data" == response.json["this is"]
|
assert "post data" == response.json["this is"]
|
||||||
|
|
||||||
|
|
||||||
def test_register_routes_csrftoken(tmpdir):
|
def test_register_routes_csrftoken(restore_working_directory, tmpdir_factory):
|
||||||
templates = tmpdir / "templates"
|
templates = tmpdir_factory.mktemp("templates")
|
||||||
templates.mkdir()
|
|
||||||
(templates / "csrftoken_form.html").write_text(
|
(templates / "csrftoken_form.html").write_text(
|
||||||
"CSRFTOKEN: {{ csrftoken() }}", "utf-8"
|
"CSRFTOKEN: {{ csrftoken() }}", "utf-8"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue