From 8bafa01abd9bcc104aa413f09ab9505abb3526a2 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 30 Jun 2011 08:52:55 +0100 Subject: Tidy up oauth imports slightly --- djangorestframework/runtests/settings.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'djangorestframework/runtests/settings.py') diff --git a/djangorestframework/runtests/settings.py b/djangorestframework/runtests/settings.py index 006727bc..9b3c2c92 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,15 +95,15 @@ 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: +except ImportError: pass else: - INSTALLED_APPS.append('oauth_provider') + INSTALLED_APPS += ('oauth_provider',) # If we're running on the Jenkins server we want to archive the coverage reports as XML. import os -- cgit v1.2.3