Skip to content
Snippets Groups Projects
Commit 12307104 authored by Ben Adida's avatar Ben Adida
Browse files

hack to determine in settings.py if we're testing

parent f8362063
Branches
No related tags found
No related merge requests found
import os, json import os, json
# a massive hack to see if we're testing, in which case we use different settings
import sys
TESTING = 'test' in sys.argv
# go through environment variables and override them # go through environment variables and override them
def get_from_env(var, default): def get_from_env(var, default):
if os.environ.has_key(var): if not TESTING and os.environ.has_key(var):
return os.environ[var] return os.environ[var]
else: else:
return default return default
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment