Add pytest fixture for database session in tests
Introduce a `db_session` pytest fixture to provide a fresh SQLite in-memory database for each test function. This ensures isolated and consistent database state across tests by setting up and tearing down the database automatically.
This commit is contained in: