Fixed test I broke in #863

This commit is contained in:
Simon Willison 2020-06-23 21:17:30 -07:00
commit 1a5b7d318f
2 changed files with 3 additions and 4 deletions

View file

@ -580,9 +580,8 @@ def test_register_routes_post(app_client):
assert "post data" == response.json["this is"]
def test_register_routes_csrftoken(tmpdir):
templates = tmpdir / "templates"
templates.mkdir()
def test_register_routes_csrftoken(restore_working_directory, tmpdir_factory):
templates = tmpdir_factory.mktemp("templates")
(templates / "csrftoken_form.html").write_text(
"CSRFTOKEN: {{ csrftoken() }}", "utf-8"
)