  
  
  class TestEmptyPrefix(URLPatternsTestCase, TestCase):
      urlpatterns = [
          url(r'^empty-prefix/', include(empty_prefix_router.urls)),
      ]
  
      def test_empty_prefix_list(self):
          response = self.client.get('/empty-prefix/')
          assert response.status_code == 200
 
</s> remove         url(r'^regex/', include(regex_url_path_router.urls)),
 </s> add         path('regex/', include(regex_url_path_router.urls)), </s> remove             url(r'^any-dash_underscore/?$', RestaurantAPIView.as_view()),
            url(r'^restaurants/branches/?$', BranchAPIView.as_view())
 </s> add             path('any-dash_underscore/', RestaurantAPIView.as_view()),
            path('restaurants/branches/', BranchAPIView.as_view()) </s> remove         url(r'^example/', include(notes_router.urls)),
 </s> add         path('example/', include(notes_router.urls)), </s> remove             url(r'^test/?$', ExampleStringTagsViewSet.as_view()),
 </s> add             path('test/', ExampleStringTagsViewSet.as_view()), </s> remove             url(r'^duplicate1/?$', views.ExampleOperationIdDuplicate1.as_view()),
            url(r'^duplicate2/?$', views.ExampleOperationIdDuplicate2.as_view()),
 </s> add             path('duplicate1/', views.ExampleOperationIdDuplicate1.as_view()),
            path('duplicate2/', views.ExampleOperationIdDuplicate2.as_view()),
        path('empty-prefix/', include(empty_prefix_router.urls)),
  
  
  class TestEmptyPrefix(URLPatternsTestCase, TestCase):
      urlpatterns = [
        path('empty-prefix/', include(empty_prefix_router.urls)),
      ]
  
      def test_empty_prefix_list(self):
          response = self.client.get('/empty-prefix/')
          assert response.status_code == 200
keep keep keep keep replace keep keep keep keep keep
 Replace all url() calls with path() or re_path() (#7512)

* url() is deprecated in Django 3.1

* update given feedbacks on url() is deprecated in Django 3.1

* Fix test_urlpatterns.py to continue testing mixed re_path() and path()

* Fix one missed reference

Co-authored-by: sanjusci <sanju.sci9@gmail.com> 
tests/test_routers.py