You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the dotted path to your callable: either `module:name` (e.g. `main:create_app`) or`module.submodule.name` (e.g. `mypackage.main.create_app`). The default is`main:create_app`.
211
+
212
+
To use a different factory without changing ini, override the fixture in your `conftest.py`:
213
+
214
+
```python
215
+
@pytest.fixture(scope="session")
216
+
def create_app():
217
+
from myapp.entry import create_app
218
+
return create_app
219
+
```
220
+
221
+
### Fixtures provided
222
+
223
+
| Fixture | Description |
224
+
|------------------|-------------|
225
+
|`app`| The running `web.Application` (server in a background thread on port 8081). |
226
+
|`client`|HTTP client for the app +`client.server.app`for the application instance. |
### Using `safe_db` for tests that create resources
233
+
234
+
Use the **`safe_db`** fixture in tests that create or change data. It records the current transaction id, runs your test, then rolls back everything created in that test so the DB stays clean.
0 commit comments