  from django.contrib.auth.models import User
  from django.core.cache import cache
  from rest_framework.test import APIRequestFactory
  from rest_framework.views import APIView
  from rest_framework.throttling import UserRateThrottle, ScopedRateThrottle
  from rest_framework.response import Response
  
  
  class User3SecRateThrottle(UserRateThrottle):
      rate = '3/sec'
 
</s> remove         if isinstance(exc, exceptions.Throttled):
 </s> add         if isinstance(exc, exceptions.Throttled) and exc.wait is not None:
from rest_framework.throttling import BaseThrottle, UserRateThrottle, ScopedRateThrottle
  from django.contrib.auth.models import User
  from django.core.cache import cache
  from rest_framework.test import APIRequestFactory
  from rest_framework.views import APIView
from rest_framework.throttling import BaseThrottle, UserRateThrottle, ScopedRateThrottle
  from rest_framework.response import Response
  
  
  class User3SecRateThrottle(UserRateThrottle):
      rate = '3/sec'
keep keep keep keep replace keep keep keep keep keep
 don't set X-Throttle-Wait-Second header if throttle wait is None 
rest_framework/tests/test_throttling.py