  
      def test_paths_construction(self):
          """Construction of the `paths` key."""
          patterns = [
              url(r'^example/?$', views.ExampleListView.as_view()),
          ]
          generator = SchemaGenerator(patterns=patterns)
          generator._initialise_endpoints()
  
          paths = generator.get_schema()["paths"]
 
</s> remove             url(r'^v1/example/?$', views.ExampleListView.as_view()),
            url(r'^v1/example/{pk}/?$', views.ExampleDetailView.as_view()),
 </s> add             path('v1/example/', views.ExampleListView.as_view()),
            path('v1/example/{pk}/', views.ExampleDetailView.as_view()), </s> remove             url(r'^example/?$', views.ExampleListView.as_view()),
            url(r'^example/{pk}/?$', views.ExampleDetailView.as_view()),
 </s> add             path('example/', views.ExampleListView.as_view()),
            path('example/{pk}/', views.ExampleDetailView.as_view()), </s> remove             url(r'^example/?$', views.ExampleListView.as_view()),
 </s> add             path('example/', views.ExampleListView.as_view()), </s> remove             url(r'^example/?$', views.ExampleListView.as_view()),
 </s> add             path('example/', views.ExampleListView.as_view()), </s> remove             url(r'^example/?$', views.ExampleGenericAPIViewModel.as_view()),
 </s> add             path('example/', views.ExampleGenericAPIViewModel.as_view()),
            path('example/', views.ExampleListView.as_view()),
  
      def test_paths_construction(self):
          """Construction of the `paths` key."""
          patterns = [
            path('example/', views.ExampleListView.as_view()),
          ]
          generator = SchemaGenerator(patterns=patterns)
          generator._initialise_endpoints()
  
          paths = generator.get_schema()["paths"]
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_openapi.py