diff --git a/rest_framework/runtests/settings.py b/rest_framework/runtests/settings.py index 67dc7fff5..b1501cf31 100644 --- a/rest_framework/runtests/settings.py +++ b/rest_framework/runtests/settings.py @@ -98,10 +98,18 @@ INSTALLED_APPS = ( 'rest_framework', 'rest_framework.authtoken', 'rest_framework.tests', - 'provider', - 'provider.oauth2', ) +try: + import provider + INSTALLED_APPS += ( + 'provider', + 'provider.oauth2', + ) +except ImportError, inst: + import logging + logging.warning("django-oauth2-provider is not install, some tests will be skipped") + STATIC_URL = '/static/' PASSWORD_HASHERS = (