  
          def request(self, method, url, *args, **kwargs):
              if not url.startswith('http'):
                  raise ValueError('Missing "http:" or "https:". Use a fully qualified URL, eg "http://testserver%s"' % url)
              return super(RequestsClient, self).request(method, url, *args, **kwargs)
  
  else:
      def RequestsClient(*args, **kwargs):
          raise ImproperlyConfigured('requests must be installed in order to use RequestsClient.')
  
 
</s> remove             super(RequestsClient, self).__init__(*args, **kwargs)
 </s> add             super().__init__(*args, **kwargs) </s> remove         return super(NonAtomicAPIExceptionView, self).dispatch(*args, **kwargs)
 </s> add         return super().dispatch(*args, **kwargs) </s> remove         return super(RelatedField, cls).__new__(cls, *args, **kwargs)
 </s> add         return super().__new__(cls, *args, **kwargs) </s> remove         return super(BaseSerializer, cls).__new__(cls, *args, **kwargs)
 </s> add         return super().__new__(cls, *args, **kwargs) </s> remove         ret = six.text_type.__new__(self, url)
 </s> add         ret = str.__new__(self, url)
            return super().request(method, url, *args, **kwargs)
  
          def request(self, method, url, *args, **kwargs):
              if not url.startswith('http'):
                  raise ValueError('Missing "http:" or "https:". Use a fully qualified URL, eg "http://testserver%s"' % url)
            return super().request(method, url, *args, **kwargs)
  
  else:
      def RequestsClient(*args, **kwargs):
          raise ImproperlyConfigured('requests must be installed in order to use RequestsClient.')
  
keep keep keep keep replace keep keep keep keep keep
 Dropped Python 2 compatibility. (#6615)

Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com> 
rest_framework/test.py