Script Tests: test_backend_pre_start.py and test_test_pre_start.py test database connection initialization.
Pytest Configuration: Uses pytest.fixture decorator for DB session and client. ## Technical Implementation - Test Framework: pytest with conftest.py for shared fixtures.
Test Database: In-memory SQLite or test PostgreSQL via engine from backend_pre_start.py:22.
Fixtures: db fixture provides a session scoped per function; client fixture uses TestClient.
Authentication: Tokens generated via superuser_token_headers using security utilities.
Code Coverage: Tests cover success and failure paths for each endpoint. ## Definition of Done - All backend tests pass (pytest exit code 0).
Each CRUD operation has at least one happy path and one error path test.
Authentication tests include correct and incorrect password scenarios.
Permission tests ensure normal users cannot modify items or manage users.
Hashing algorithm upgrade from bcrypt to Argon2 is verified test_user.py:96.