Logo
Explore Help
Sign In
darkhelm/notifications-admin
1
0
Fork 0
You've already forked notifications-admin
mirror of https://github.com/GSA/notifications-admin.git synced 2025-12-09 06:33:52 -05:00
Code Issues Packages Projects Releases Wiki Activity
Files
7d6d15f07bbc4ec9d41ad6f09248ca0a8ab8dcad
notifications-admin/pytest.ini

12 lines
284 B
INI
Raw Normal View History

Automatically set environment vars before tests Sometimes you just wanna run some tests directly using the `pytest` command. But you’re in a new shell, and have forgotten to do `source environment_test.sh`. The screen fills with red, and your day just got a little bit worse. This commit will stop this from ever happening again, by making the setting environment variables part of running Pytest. It does this with a plugin called pytest-env[1]. pytest.ini is the standard way of configuring pytest. Creating this file where it didn’t exist before changes the behaviour of pytest, in that it will now look for tests in the same directory as the file, rather than defaulting to the `tests/` directory. So we also have to explicitly configure pytest[2] to tell it that it should only look in this directory. Otherwise it gets lost in the weeds of `node_modules`. 1. https://github.com/MobileDynasty/pytest-env 2. https://docs.pytest.org/en/latest/customize.html#confval-testpaths
2018-02-14 09:49:27 +00:00
[pytest]
testpaths = tests
env =
NOTIFY_ENVIRONMENT=test
ADMIN_CLIENT_SECRET=dev-notify-secret-key
API_HOST_NAME=test
DANGEROUS_SALT=dev-notify-salt
SECRET_KEY=dev-notify-secret-key
DESKPRO_API_HOST=test
DESKPRO_API_KEY=test
STATSD_PREFIX=stats-prefix
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.0 Page: 1134ms Template: 7ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API