CHORE: Updated tests to better check env vars

This commit is contained in:
2024-01-30 19:30:02 +00:00
parent faad412809
commit 077ae93d89
4 changed files with 13 additions and 7 deletions

View File

@ -1,11 +1,14 @@
from os import environ
from warnings import warn
from tests import old_env
# Tests environment variables used within the projects domain are
# set in the correct environment
VARS = ['ENVIRON', 'APPSECRET', 'FILESTORE']
ENV_STATES = ['test', 'prod']
def test_env_vars():
""" Test that required environment variables are set
@ -23,6 +26,6 @@ def test_environment_var_state():
""" Tests that the 'ENVIRON' Environment variable
is in a correct state
"""
var = environ.get('ENVIRON')
var = old_env
assert var is not None
assert (var == "test" or var == "prod")
assert (var in ENV_STATES)