A non-admin user fixture. To add to an environment with permissions use the fixture with_environment_permissions, or similar with the fixture This fixture is attached to the organisation fixture.
(django_user_model)
| 300 | |
| 301 | @pytest.fixture() |
| 302 | def staff_user(django_user_model): # type: ignore[no-untyped-def] |
| 303 | """ |
| 304 | A non-admin user fixture. |
| 305 | |
| 306 | To add to an environment with permissions use the fixture |
| 307 | with_environment_permissions, or similar with the fixture |
| 308 | |
| 309 | |
| 310 | This fixture is attached to the organisation fixture. |
| 311 | """ |
| 312 | return django_user_model.objects.create(email="staff@example.com") |
| 313 | |
| 314 | |
| 315 | @pytest.fixture() |