Exemple #1
0
def test_check_env():
    env = Env()
    # if all of the variables aren't in the environment
    # raise an EnvironmentError
    for var in env.REQUIRED:
        if var in os.environ:
            del os.environ[var]

    # check the environment
    enver.check_env(env)
Exemple #2
0
def test_check_env_no_required():
    env = NotRequiredEnv()
    # check the environment, and don't raise an error as none of
    # the environment variables are required by the app runtime
    enver.check_env(env)