mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Nicer pattern for make_app_client() in tests, closes #395
This commit is contained in:
parent
5ed2853cf3
commit
abc7339124
7 changed files with 56 additions and 42 deletions
|
|
@ -27,7 +27,7 @@ def custom_pages_client(tmp_path_factory):
|
|||
nested_dir = pages_dir / "nested"
|
||||
nested_dir.mkdir()
|
||||
(nested_dir / "nest.html").write_text("Nest!", "utf-8")
|
||||
for client in make_app_client(template_dir=str(template_dir)):
|
||||
with make_app_client(template_dir=str(template_dir)) as client:
|
||||
yield client
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue