  
      def test_schema_construction(self):
          """Construction of the top level dictionary."""
          patterns = [
              url(r'^example/?$', views.ExampleListView.as_view()),
          ]
          generator = SchemaGenerator(patterns=patterns)
  
          request = create_request('/')
          schema = generator.get_schema(request=request)
 
</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()), </s> remove             url(r'^example/?$', views.ExampleListView.as_view()),
 </s> add             path('example/', views.ExampleListView.as_view()), </s> remove             url(r'^api-token-auth/', obtain_auth_token)
 </s> add             path('api-token-auth/', obtain_auth_token)
            path('example/', views.ExampleListView.as_view()),
  
      def test_schema_construction(self):
          """Construction of the top level dictionary."""
          patterns = [
            path('example/', views.ExampleListView.as_view()),
          ]
          generator = SchemaGenerator(patterns=patterns)
  
          request = create_request('/')
          schema = generator.get_schema(request=request)
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