          MockView.as_view(
              authentication_classes=[CustomKeywordTokenAuthentication]
          )
      ),
      url(r'^auth-token/$', obtain_auth_token),
      url(r'^auth/', include('rest_framework.urls', namespace='rest_framework')),
  ]
  
  
  @override_settings(ROOT_URLCONF=__name__)
  class BasicAuthTests(TestCase):
 
</s> remove     url(
        r'^customkeywordtoken/$',
 </s> add     path(
        'customkeywordtoken/', </s> remove     url(r'^$', MockView.as_view()),
    url(r'^auth/', include('rest_framework.urls', namespace='rest_framework')),
 </s> add     path('', MockView.as_view()),
    path('auth/', include('rest_framework.urls', namespace='rest_framework')), </s> remove     url(
        r'^customtoken/$',
 </s> add     path(
        'customtoken/', </s> remove     url(
        r'^basic/$',
 </s> add     path(
        'basic/', </s> remove     url(
        r'^token/$',
 </s> add     path(
        'token/',
    path('auth-token/', obtain_auth_token),
    path('auth/', include('rest_framework.urls', namespace='rest_framework')),
          MockView.as_view(
              authentication_classes=[CustomKeywordTokenAuthentication]
          )
      ),
    path('auth-token/', obtain_auth_token),
    path('auth/', include('rest_framework.urls', namespace='rest_framework')),
    path('auth-token/', obtain_auth_token),
    path('auth/', include('rest_framework.urls', namespace='rest_framework')),
  ]
  
  
  @override_settings(ROOT_URLCONF=__name__)
  class BasicAuthTests(TestCase):
keep keep keep keep replace 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/authentication/test_authentication.py