      @list_route(custom_method_name="list_custom-route")
      def list_custom_route_get(self, request, *args, **kwargs):
          return Response({'method': 'link1'})
  
      @detail_route(custom_method_name="detail_custom-route")
      def detail_custom_route_get(self, request, *args, **kwargs):
          return Response({'method': 'link2'})
  
  
  class TestDynamicListAndDetailRouter(TestCase):
 
</s> remove     @list_route(custom_method_name="list_custom-route")
 </s> add     @list_route(url_path="list_custom-route") </s> remove                                  '^{{prefix}}/{{lookup}}/{0}{{trailing_slash}}$'.format(custom_method_name))
 </s> add                                  '^{{prefix}}/{{lookup}}/{0}{{trailing_slash}}$'.format(url_path)) </s> remove                                  '^{{prefix}}/{0}{{trailing_slash}}$'.format(custom_method_name))
 </s> add                                  '^{{prefix}}/{0}{{trailing_slash}}$'.format(url_path)) </s> remove             custom_method_name = endpoint.custom_method_name
 </s> add             url_path = endpoint.url_path </s> remove         MethodNamesMap = namedtuple('MethodNamesMap', 'method_name custom_method_name')
 </s> add         MethodNamesMap = namedtuple('MethodNamesMap', 'method_name url_path')
    @detail_route(url_path="detail_custom-route")
      @list_route(custom_method_name="list_custom-route")
      def list_custom_route_get(self, request, *args, **kwargs):
          return Response({'method': 'link1'})
  
    @detail_route(url_path="detail_custom-route")
      def detail_custom_route_get(self, request, *args, **kwargs):
          return Response({'method': 'link2'})
  
  
  class TestDynamicListAndDetailRouter(TestCase):
keep keep keep keep replace keep keep keep keep keep
 Updated tests to use url_path attribute in list and detail decorators 
tests/test_routers.py