A repository for learning pytest by building a Django web application.
The application lists companies and indicates wether they are laying off/ hiring freeze or hiring.
To run this project, you will need to add the following environment variables to your .env file
PYTHONPATH=/{YOUR_PATH_TO_PROJECT}/my-pytest-course/:/{YOUR_PATH_TO_PROJECT}/my-pytest-course/api/coronavstech
DJANGO_SETTING_MODULE=api.coronavstech.coronavstech.settings
Clone the project
git clone https://bitbucket.org/e-marco/my-pytest-course/src/master/
Go to the project directory
cd my-pytest-course
Install dependencies
pipenv install
Start the Django server
pipenv run api/coronavstech/manage.py runserver
To run tests, run the following command
pipenv run pytest .
To set up virual env, run the following command
1. python3.9 -m venv env
2. source env/bin/activate (activate the venv)
3. deactivate ( remove venv)
pytest test_our_first_test.py -v -s -p no:warnings