Start FormSubmit app at tmp_path via AppHarness. Args: request: pytest request fixture tmp_path_factory: pytest tmp_path_factory fixture Yields: running AppHarness instance
(request, tmp_path_factory)
| 146 | ], |
| 147 | ) |
| 148 | def form_submit(request, tmp_path_factory) -> Generator[AppHarness, None, None]: |
| 149 | """Start FormSubmit app at tmp_path via AppHarness. |
| 150 | |
| 151 | Args: |
| 152 | request: pytest request fixture |
| 153 | tmp_path_factory: pytest tmp_path_factory fixture |
| 154 | |
| 155 | Yields: |
| 156 | running AppHarness instance |
| 157 | """ |
| 158 | param_id = request._pyfuncitem.callspec.id.replace("-", "_") |
| 159 | with AppHarness.create( |
| 160 | root=tmp_path_factory.mktemp("form_submit"), |
| 161 | app_source=request.param, |
| 162 | app_name=request.param.func.__name__ + f"_{param_id}", |
| 163 | ) as harness: |
| 164 | assert harness.app_instance is not None, "app is not running" |
| 165 | yield harness |
| 166 | |
| 167 | |
| 168 | @pytest.fixture |