  
      def setUp(self):
          # these imports are here because oauth is optional and hiding them in try..except block or compat
          # could obscure problems if something breaks
          from oauth_provider.models import Consumer, Resource
          from oauth_provider.models import Token as OAuthToken
          from oauth_provider import consts
  
          self.consts = consts
  
 
</s> remove from rest_framework.compat import oauth2_provider, provider_now
 </s> add from rest_framework.compat import oauth2_provider, provider_now, check_nonce </s> remove         return oauth_provider_store.check_nonce(request, oauth_request,
            oauth_request['oauth_nonce'], oauth_request['oauth_timestamp'])
 </s> add         oauth_nonce = oauth_request['oauth_nonce']
        oauth_timestamp = oauth_request['oauth_timestamp']
        return check_nonce(request, oauth_request, oauth_nonce, oauth_timestamp)
        from oauth_provider.models import Consumer, Scope
  
      def setUp(self):
          # these imports are here because oauth is optional and hiding them in try..except block or compat
          # could obscure problems if something breaks
        from oauth_provider.models import Consumer, Scope
          from oauth_provider.models import Token as OAuthToken
          from oauth_provider import consts
  
          self.consts = consts
  
keep keep keep keep replace keep keep keep keep keep
 Compat fixes for django-oauth-plus versions 2.0-2.2.1 
rest_framework/tests/test_authentication.py