  from django.conf.urls import include, url
  from django.test import TestCase
  from django.urls import Resolver404, path, re_path
  
  from rest_framework.compat import make_url_resolver
  from rest_framework.test import APIRequestFactory
  from rest_framework.urlpatterns import format_suffix_patterns
  
  # A container class for test paths for the test case
  URLTestPath = namedtuple('URLTestPath', ['path', 'args', 'kwargs'])
 
</s> remove from django.urls import Resolver404, path, re_path
 </s> add from django.urls import Resolver404, URLResolver, path, re_path
from django.urls.resolvers import RegexPattern </s> remove from django.urls import path, register_converter
 </s> add from django.urls import URLResolver, path, register_converter
from django.urls.resolvers import RoutePattern </s> remove from rest_framework.compat import (
    URLResolver, get_regex_pattern, is_route_pattern
)
 </s> add  </s> remove         pairs = [(inspector.get_path_from_regex(get_regex_pattern(pattern)), pattern.callback)
 </s> add         pairs = [(inspector.get_path_from_regex(pattern.pattern.regex.pattern), pattern.callback) </s> remove from rest_framework.compat import get_regex_pattern
 </s> add 
  from django.conf.urls import include, url
  from django.test import TestCase
  from django.urls import Resolver404, path, re_path
  

  from rest_framework.test import APIRequestFactory
  from rest_framework.urlpatterns import format_suffix_patterns
  
  # A container class for test paths for the test case
  URLTestPath = namedtuple('URLTestPath', ['path', 'args', 'kwargs'])
keep keep keep keep replace keep keep keep keep keep
 Drop all compat support to Django < 2 urls (#7337) 
tests/test_urlpatterns.py