aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/runtests/settings.py
diff options
context:
space:
mode:
authorTom Christie2011-06-28 08:53:53 +0100
committerTom Christie2011-06-28 08:53:53 +0100
commite5e019b0b3abc41118a50af7878541b305c2bd5e (patch)
tree047df2052879173e17bc4164a7d9f9f670a02685 /djangorestframework/runtests/settings.py
parentd714901a60e848e5f3c9f178551fc287aae40f96 (diff)
parentfe7e3ba3ae692b5f20719d5de52682a57166ded2 (diff)
downloaddjango-rest-framework-e5e019b0b3abc41118a50af7878541b305c2bd5e.tar.bz2
Pull in David's initial oauth tests
Diffstat (limited to 'djangorestframework/runtests/settings.py')
-rw-r--r--djangorestframework/runtests/settings.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/djangorestframework/runtests/settings.py b/djangorestframework/runtests/settings.py
index 71664f8b..006727bc 100644
--- a/djangorestframework/runtests/settings.py
+++ b/djangorestframework/runtests/settings.py
@@ -84,7 +84,7 @@ TEMPLATE_DIRS = (
# Don't forget to use absolute paths, not relative paths.
)
-INSTALLED_APPS = (
+INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
@@ -95,8 +95,17 @@ INSTALLED_APPS = (
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'djangorestframework',
-)
+]
+
+# OAuth support is optional, so we only test oauth if it's installed.
+try:
+ import oauth_provider
+except:
+ pass
+else:
+ INSTALLED_APPS.append('oauth_provider')
+# If we're running on the Jenkins server we want to archive the coverage reports as XML.
import os
if os.environ.get('HUDSON_URL', None):
TEST_RUNNER = 'xmlrunner.extra.djangotestrunner.XMLTestRunner'