Description
The project has no automated tests. Add a pytest test suite covering the core CRUD flows.
What to do
Acceptance Criteria
pytest runs and all tests pass
- Tests use a separate test database, not the development
tasks.db
- No test leaves data behind (use
TestClient with a fresh DB per session)
Hints
Difficulty
🟡 Intermediate
Description
The project has no automated tests. Add a
pytesttest suite covering the core CRUD flows.What to do
pip install pytest httpxto dependenciestests/folder with__init__.pyandtest_tasks.py,test_users.pyTestClientwith an in-memory SQLite database (nottasks.db)completedis Falsecompletedis TrueAcceptance Criteria
pytestruns and all tests passtasks.dbTestClientwith a fresh DB per session)Hints
get_dbdependency in tests to point at a test databaseDifficulty
🟡 Intermediate