Framework Mode - Database fixture patterns
Folder Structure
tests/ ├── test_users.py ├── test_orders.py ├── conftest.py fixtures/ ├── db_fixtures.py utils/ ├── db_helpers.py config/ ├── config.yaml
tests/ ├── test_users.py ├── test_orders.py ├── conftest.py fixtures/ ├── db_fixtures.py utils/ ├── db_helpers.py config/ ├── config.yaml
db_fixtures.py).tests/ use fixtures to prepare database state before running tests.db_helpers.py).config.yaml).config.yaml file to store database connection strings for different environments (dev, test, prod).conftest.py to provide fixtures with environment-specific settings.--junitxml=report.xml for CI systems.pytest-html for readable HTML reports.function scope for tests needing clean state, session scope for expensive setup.Where would you add a new fixture that sets up a test user in the database?