Merge pull request #1492 from rtfd/tox-local-testing

Add tox setting to disregard local_settings.py
build-pdf-ret-val
Eric Holscher 2015-07-27 12:54:03 -07:00
commit 437fbab959
5 changed files with 28 additions and 18 deletions

View File

@ -1,3 +1,5 @@
import os
from .base import * # noqa
DATABASES = {
@ -52,7 +54,8 @@ DONT_HIT_DB = False
#USE_SUBDOMAIN = True
try:
from local_settings import * # noqa
except ImportError:
pass
if not os.environ.get('DJANGO_SETTINGS_SKIP_LOCAL', False):
try:
from local_settings import * # noqa
except ImportError:
pass

View File

@ -1,3 +1,5 @@
import os
from .base import * # noqa
@ -67,7 +69,8 @@ SOCIALACCOUNT_PROVIDERS = {
'github': {'SCOPE': ['user:email', 'read:org', 'admin:repo_hook', 'repo:status']}
}
try:
from local_settings import * # noqa
except ImportError:
pass
if not os.environ.get('DJANGO_SETTINGS_SKIP_LOCAL', False):
try:
from local_settings import * # noqa
except ImportError:
pass

View File

@ -1,4 +1,4 @@
import os.path
import os
from .base import * # noqa
@ -52,7 +52,8 @@ CORS_ORIGIN_WHITELIST = (
'test:8000',
)
try:
from local_settings import * # noqa
except ImportError:
pass
if not os.environ.get('DJANGO_SETTINGS_SKIP_LOCAL', False):
try:
from local_settings import * # noqa
except ImportError:
pass

View File

@ -1,4 +1,4 @@
import os.path
import os
from .sqlite import * # noqa
@ -9,7 +9,9 @@ SLUMBER_API_HOST = 'http://localhost:8000'
PRODUCTION_DOMAIN = 'readthedocs.org'
GROK_API_HOST = 'http://localhost:8888'
try:
from local_settings import * # noqa
except ImportError:
pass
if not os.environ.get('DJANGO_SETTINGS_SKIP_LOCAL', False):
try:
from local_settings import * # noqa
except ImportError:
pass

View File

@ -7,6 +7,7 @@ setenv =
PYTHONPATH={toxinidir}/readthedocs:{toxinidir}
DJANGO_SETTINGS_MODULE=settings.test
LANG=C
DJANGO_SETTINGS_SKIP_LOCAL=True
deps = -r{toxinidir}/requirements/pip.txt
changedir = {toxinidir}/readthedocs
commands =