https://github.com/dm-zhuk/goit-pythonweb-hw-012
REST API-app
https://github.com/dm-zhuk/goit-pythonweb-hw-012
docker-compose python3 rest-api
Last synced: about 2 months ago
JSON representation
REST API-app
- Host: GitHub
- URL: https://github.com/dm-zhuk/goit-pythonweb-hw-012
- Owner: dm-zhuk
- Created: 2025-06-16T19:56:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-25T23:38:02.000Z (12 months ago)
- Last Synced: 2025-06-26T00:29:34.403Z (12 months ago)
- Topics: docker-compose, python3, rest-api
- Language: Python
- Homepage:
- Size: 3.22 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Contacts Management REST API
This project is a fully tested and Dockerized RESTful API for managing contacts, featuring:
- JWT-based authentication
- Role-based access control
- PostgreSQL & Redis integration
- Pytest coverage for both unit and integration tests
## ๐งช Testing & Coverage
This project uses **Poetry**, **Pytest**, **Coverage.py**, and **Docker Compose** to run unit and integration tests with combined coverage reporting.
### ๐ง Prerequisites
- [Poetry](https://python-poetry.org/docs/)
- [Docker](https://www.docker.com/)
- [Docker Compose](https://docs.docker.com/compose/)
### ๐งผ Clean up previous results
```bash
make clean
### โ
Run local unit tests (pure mocks)
```bash
make .coverage.unit
### ๐ณ Run integration tests (DB + Redis via Docker)
```bash
make .coverage.integration
### ๐ฆ Combine & view coverage reports
```bash
make combine-coverage
Combines coverage data from unit + integration runs and generates an HTML report:
๐ Open htmlcov/index.html in your browser to view it.
### ๐ Full test pipeline (clean โ test โ report)
```bash
make test-all
#### Runs everything in order:
Run Clean up
Run unit tests
Run integration tests
Combine coverage reports