          super(URLPatternsTestCase, cls).setUpClass()
  
      @classmethod
      def tearDownClass(cls):
          super(URLPatternsTestCase, cls).tearDownClass()
          cls._override.disable()
  
          if hasattr(cls, '_module_urlpatterns'):
              cls._module.urlpatterns = cls._module_urlpatterns
          else:
 
</s> remove         super(URLPatternsTestCase, cls).setUpClass()
 </s> add         super().setUpClass() </s> remove         super(TestUrlPatternTestCase, cls).setUpClass()
 </s> add         super().setUpClass() </s> remove         super(TestUrlPatternTestCase, cls).tearDownClass()
 </s> add         super().tearDownClass() </s> remove             if isinstance(urlconf, six.string_types):
 </s> add             if isinstance(urlconf, str): </s> remove         return six.text_type(attr)
 </s> add         return str(attr)
        super().tearDownClass()
          super(URLPatternsTestCase, cls).setUpClass()
  
      @classmethod
      def tearDownClass(cls):
        super().tearDownClass()
          cls._override.disable()
  
          if hasattr(cls, '_module_urlpatterns'):
              cls._module.urlpatterns = cls._module_urlpatterns
          else:
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