Skip to main content

Pytest plugin used to setup environment variables with django-dotenv

Project description

pytest-django-dotenv

Pytest plugin used to specify dotenv for your tests. This project uses django-dotenv to load your environment variables from your dotenv file.

Installation

pip install pytest-django-dotenv

Setup

Base setup uses .env file which is placed equally with virtual environment directory. If you want to change that behavior you have to add env_path to your pytest.ini file which allow you to change path to dotenv file starting from parent of virtualenv directory.

Example: If we have virtualenv i a directory and dotenv file is placed in parent of a directory then you should add this to your pytest.ini file.

[pytest]
env_path = 
    ../.env

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pytest-django-dotenv, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size pytest_django_dotenv-0.1.2-py3-none-any.whl (3.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size pytest-django-dotenv-0.1.2.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page