Fixed tests to reflect desired configuration behaviour

Test for when environment variable and configuration file
variable both set now tests that the environment variable takes
precedence

Removed logic that would never be triggered from
lib/ansible/constants.py
This commit is contained in:
willthames 2012-10-18 12:53:30 +10:00
commit 5a769a5a4d
3 changed files with 67 additions and 2 deletions

View file

@ -29,8 +29,6 @@ def get_config(p, section, key, env_var, default):
try:
return p.get(section, key)
except:
if env_var is not None:
return os.environ.get(env_var, default)
return default
else:
return default