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
|
|
@ -4,7 +4,7 @@ from .fixtures import make_app_client
|
|||
|
||||
@pytest.fixture
|
||||
def canned_write_client():
|
||||
for client in make_app_client(
|
||||
with make_app_client(
|
||||
extra_databases={"data.db": "create table names (name text)"},
|
||||
metadata={
|
||||
"databases": {
|
||||
|
|
@ -35,7 +35,7 @@ def canned_write_client():
|
|||
}
|
||||
}
|
||||
},
|
||||
):
|
||||
) as client:
|
||||
yield client
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue