CHORE: Updated tests to better check env vars
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user