generated from john/python-template
V4.2 complete
This commit is contained in:
@@ -47,6 +47,13 @@ def app_client(tmp_path_factory: pytest.TempPathFactory) -> AsyncGenerator[tuple
|
||||
app = create_app(settings=settings)
|
||||
|
||||
with TestClient(app) as client:
|
||||
runtime_path = Path(str(app.state.runtime.engine.url.database)).resolve()
|
||||
expected_path = Path(settings.database.path).resolve()
|
||||
if runtime_path != expected_path:
|
||||
raise RuntimeError(
|
||||
"Refusing to initialize destructive UI fixtures against "
|
||||
f"{runtime_path}; expected {expected_path}"
|
||||
)
|
||||
yield app, client
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user