      def setUp(self):
          router = DefaultRouter()
          router.register('example1', MethodLimitedViewSet, basename='example1')
          self.patterns = [
              url(r'^', include(router.urls))
          ]
  
      def test_schema_for_regular_views(self):
          """
          Ensure that schema generation works for ViewSet classes
 
</s> remove             url('^example/?$', views.ExampleListView.as_view()),
            url(r'^', include(router.urls))
 </s> add             path('example/', views.ExampleListView.as_view()),
            path('', include(router.urls)) </s> remove             url(r'^example/?$', views.ExampleListView.as_view()),
            url(r'^example/(?P<pk>\d+)/?$', views.ExampleDetailView.as_view()),
            url(r'^example/(?P<pk>\d+)/sub/?$', views.ExampleDetailView.as_view()),
 </s> add             path('example/', views.ExampleListView.as_view()),
            path('example/<int:pk>/', views.ExampleDetailView.as_view()),
            path('example/<int:pk>/sub/', views.ExampleDetailView.as_view()), </s> remove             url(r'^api/v1/example/?$', views.ExampleListView.as_view()),
            url(r'^api/v1/example/(?P<pk>\d+)/?$', views.ExampleDetailView.as_view()),
            url(r'^api/v1/example/(?P<pk>\d+)/sub/?$', views.ExampleDetailView.as_view()),
 </s> add             path('api/v1/example/', views.ExampleListView.as_view()),
            path('api/v1/example/<int:pk>/', views.ExampleDetailView.as_view()),
            path('api/v1/example/<int:pk>/sub/', views.ExampleDetailView.as_view()), </s> remove             url(r'^example/?$', ForeignKeySourceView.as_view()),
 </s> add             path('example/', ForeignKeySourceView.as_view()), </s> remove             url(r'^example/?$', ManyToManySourceView.as_view()),
 </s> add             path('example/', ManyToManySourceView.as_view()),
            path('', include(router.urls))
      def setUp(self):
          router = DefaultRouter()
          router.register('example1', MethodLimitedViewSet, basename='example1')
          self.patterns = [
            path('', include(router.urls))
          ]
  
      def test_schema_for_regular_views(self):
          """
          Ensure that schema generation works for ViewSet classes
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/schemas/test_coreapi.py