Added unit and functional tests #32

Merged
H4CK3R-01 merged 5 commits from api_tests into main 2022-03-30 09:14:04 +00:00
Showing only changes of commit 4b7dfa8afd - Show all commits

View File

@ -10,6 +10,16 @@ Aktienbot API
2. Or set variables using `export` or `set` commands. (Windows `set`, Linux `export`) 2. Or set variables using `export` or `set` commands. (Windows `set`, Linux `export`)
4. Run api `python api/app.py` 4. Run api `python api/app.py`
## Testing
1. Create virtual environment `python -m venv venv env/Scripts/activate`
2. Install requirements `pip install -r api/requirements.txt`
3. Set environment variables (see list below)
1. Use `.env`-file in `api` directory like `.env.example`
2. Or set variables using `export` or `set` commands. (Windows `set`, Linux `export`)
4. Change directory: `cd api/`
5. Run tests: `python -m pytest -v --cov-report term-missing --cov=app`
## Environment variables ## Environment variables
``` ```
# Flask secret key # Flask secret key