# fixture 'db_session' not found
available fixtures: cache, capfd, ...

- **ID:** `python/pytest-fixture-not-found-typo`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Fixture name is misspelled, defined in a conftest.py outside the test's directory scope, or not imported because the plugin is not installed.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.x | active | — | — |
| 8.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   Create `tests/conftest.py` with `@pytest.fixture
def db_session(): ...` and ensure tests are under `tests/`.
   ```
2. **** (90% success)
   ```
   `pip install pytest-django` then in pytest.ini: `[pytest]
DJANGO_SETTINGS_MODULE = myproj.settings`
   ```

## Dead Ends

- **** — Duplicates fixture logic across many test files and defeats the purpose of shared fixtures. (40% fail)
- **** — Shadows a built-in pytest fixture and causes unexpected behavior in other tests. (90% fail)
