/my-pytest

Primary LanguagePython

 my-pytest-course

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.

Logo

Environment Variables

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

Run Locally

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

Running Tests

To run tests, run the following command

  pipenv run pytest .

setup virtual env

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)

Python Command to run the pytest

pytest test_our_first_test.py -v -s -p no:warnings

🔗 Links

linkedin twitter