I started writing a django app with the help of pipenv.
From the CLI I run my tests via pipenv run ./manage.py test
. That loads my .env
-file puts me inside the virtualenv and executes the test command.
Now I want to do the same with a Run configuration in intellij.
What I did:
- Created a new run configuration with "Django tests" base
- "use specified interpreter" is set to my virtualenv
- all other options are set to default
When I run the tests with that new configuration, I get errors that indicate, that DJANGO_SETTINGS_MODULE
wasn't really set.
Looking further the command intellij uses for running my tests is /home/user/.virtualenvs/django-proj-wQnnAIXN/bin/python /home/user/.IntelliJIdea2017.3/config/plugins/python/helpers/pycharm/django_test_manage.py test /home/user/dev/django-proj_site
How can I tell intellij to run the tests with pipenv run ..
so that my .env
file is loaded?