  from django.db import models
  from django.test import TestCase, override_settings
  
  from rest_framework import permissions, serializers, viewsets
  from rest_framework.compat import get_regex_pattern
  from rest_framework.decorators import detail_route, list_route
 
</s> remove from django.test import TestCase
 </s> add from django.conf.urls import include, url
from django.db import models
from django.test import TestCase, override_settings
from django.urls import resolve
  from django.db import models
  from django.test import TestCase, override_settings
from django.urls import resolve
  
  from rest_framework import permissions, serializers, viewsets
  from rest_framework.compat import get_regex_pattern
  from rest_framework.decorators import detail_route, list_route
keep add keep keep keep keep
 Add '.basename' and '.reverse_action()' to ViewSet (#5648)

* Router sets 'basename' on ViewSet

* Add 'ViewSet.reverse_action()' method

* Test router setting initkwargs 
tests/test_routers.py