      import oauth2 as oauth
      from oauth_provider.decorators import oauth_required
      from oauth_provider.models import Resource, Consumer, Token
  
  except:
      pass
  
  else:
      # Alrighty, we're good to go here.
      class ClientView(View):
 
</s> remove     INSTALLED_APPS.append('oauth_provider')
 </s> add     INSTALLED_APPS += ('oauth_provider',) </s> remove except:
 </s> add except ImportError: </s> remove ]
 </s> add ) </s> remove INSTALLED_APPS = [
 </s> add INSTALLED_APPS = (
except ImportError:
      import oauth2 as oauth
      from oauth_provider.decorators import oauth_required
      from oauth_provider.models import Resource, Consumer, Token
  
except ImportError:
      pass
  
  else:
      # Alrighty, we're good to go here.
      class ClientView(View):
keep keep keep keep replace keep keep keep keep keep
 Tidy up oauth imports slightly 
djangorestframework/tests/oauthentication.py