make sure the venv is activated run:
venv/Scripts/activate.bat
mac:
source venv/Script/activate
to deactivate the venv: deactivate
If you get errors with pip not found: solution:
python -m ensurepip
to remove the pycache folder: link github
git rm -r --cached . && git add . && git commit -m "fixing .gitignore"
setup environment variable:
next to header and body, choose "Tests" paste the following:
pm.environment.set("JWT", pm.response.json().access_token);
this will set the environment variable JWT to the value of the access_token
you can set the variable in Environment left tab in Postman
- you can also set URL variable and replace your URL with
{{url}}
If you are on windows machine: You should not use gitbas to run the commends, instead use powershell or cmd as follows:
heroku run "alembic upgrade head"
Make sure after installing Heroku cli to close your terminal and restart VS code.
flags: pytest --disable-warnings -> disable warnings pytest -v -> verbose pytest -s -> show output pytest -x -> exit on first failure pytest -v -rP -> Captured stdout calls like print statements
uvicorn app.main:app --reload
pytest -v -rP