Example #1
0
 def test_load_dash_env_vars_refects_to_os_environ(self):
     for var in DASH_ENV_VARS.keys():
         os.environ[var] = 'true'
         vars = load_dash_env_vars()
         self.assertEqual(vars[var], 'true')
         os.environ[var] = 'false'
         vars = load_dash_env_vars()
         self.assertEqual(vars[var], 'false')
Example #2
0
def test_load_dash_env_vars_refects_to_os_environ(empty_environ):
    for var in DASH_ENV_VARS.keys():
        os.environ[var] = "true"
        vars = load_dash_env_vars()
        assert vars[var] == "true"

        os.environ[var] = "false"
        vars = load_dash_env_vars()
        assert vars[var] == "false"
Example #3
0
 def test_dash_env_vars(self):
     self.assertEqual(
         {None}, {val
                  for _, val in DASH_ENV_VARS.items()},
         "initial var values are None without extra OS environ setting")
Example #4
0
 def setUp(self):
     for k in DASH_ENV_VARS.keys():
         if k in os.environ:
             os.environ.pop(k)
Example #5
0
def test_dash_env_vars(empty_environ):
    assert {None} == {
        val for _, val in DASH_ENV_VARS.items()
    }, "initial var values are None without extra OS environ setting"
Example #6
0
def empty_environ():
    for k in DASH_ENV_VARS.keys():
        if k in os.environ:
            os.environ.pop(k)