Skip to content

Commit

Permalink
Merge pull request #981 from rapilabs/master
Browse files Browse the repository at this point in the history
Test config & settings updates
  • Loading branch information
pennersr committed Jun 17, 2015
2 parents 2b5bc5d + 536df4c commit 0170dac
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 16 deletions.
11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ env:
global:
- TEST_APPS="allauth account socialaccount amazon angellist bitbucket coinbase evernote feedly foursquare douban dropbox dropbox_oauth2 facebook flickr google github hubic instagram linkedin linkedin_oauth2 mailru odnoklassniki windowslive openid orcid paypal persona soundcloud spotify stackexchange tumblr twitch twitter vimeo vk weibo bitly xing"
matrix:
- DJANGO=Django==1.5
- DJANGO=Django==1.6
- DJANGO=Django==1.7
- DJANGO="Django<1.6"
- DJANGO="Django<1.7"
- DJANGO="Django<1.8"
- DJANGO="Django<1.9"
install:
- pip install $DJANGO --use-mirrors
- pip install . --use-mirrors
Expand All @@ -24,7 +25,9 @@ script: if [ -o $DJANGO == Django==1.5 ]; then coverage run manage.py test $TEST
matrix:
exclude:
- python: "2.6"
env: DJANGO=Django==1.7
env: DJANGO="Django<1.8"
- python: "2.6"
env: DJANGO="Django<1.9"
after_success:
- coverage report
- pip install --quiet python-coveralls
Expand Down
46 changes: 34 additions & 12 deletions test_settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-

import django

SECRET_KEY = 'psst'
SITE_ID = 1

Expand All @@ -16,18 +18,38 @@

ROOT_URLCONF = 'allauth.urls'

TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.request",
"django.contrib.messages.context_processors.messages",

"allauth.account.context_processors.account",
"allauth.socialaccount.context_processors.socialaccount",
)
if django.VERSION >= (1, 8):
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.request',
'allauth.account.context_processors.account',
'allauth.socialaccount.context_processors.socialaccount',
],
},
},
]
else:
TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.request",
"django.contrib.messages.context_processors.messages",

"allauth.account.context_processors.account",
"allauth.socialaccount.context_processors.socialaccount",
)

MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
Expand Down

0 comments on commit 0170dac

Please sign in to comment.