aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/runtests
diff options
context:
space:
mode:
Diffstat (limited to 'djangorestframework/runtests')
-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'