A simple Task Management REST API built with Python and Flask, with an automated test suite using pytest.
- Python
- Flask
- REST API
- pytest
- Git & GitHub
- Create tasks
- Retrieve tasks
- Update tasks
- Delete tasks
- Input validation
- Error handling
- Automated API testing
| Method | Endpoint | Description |
|---|---|---|
| GET | /tasks |
Get all tasks |
| GET | /tasks/<id> |
Get a specific task |
| POST | /tasks |
Create a task |
| PUT | /tasks/<id> |
Update a task |
| DELETE | /tasks/<id> |
Delete a task |
The project includes automated tests covering:
- Successful API requests
- Invalid inputs
- Missing task titles
- Non-existent tasks
- Invalid task IDs
- API response validation
- HTTP status codes
- Edge cases
- Regression testing
- Test fixtures and test isolation
Create and activate a virtual environment, then install the dependencies:
pip install -r requirements.txtRun the Flask application:
python app.pyThe API will be available at:
http://127.0.0.1:5000
Run the complete automated test suite:
pytest -vThe project currently contains 10 automated tests covering:
- CRUD API operations
- Valid and invalid requests
- Edge cases
- API response validation
- HTTP status codes
- Test fixtures
- Test isolation
- Regression scenarios
All tests are passing successfully.
10 passed