Nicer pattern for make_app_client() in tests, closes #395

This commit is contained in:
Simon Willison 2020-06-07 14:14:10 -07:00
commit abc7339124
7 changed files with 56 additions and 42 deletions

View file

@ -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