  from django.test import TestCase
  from django.core.exceptions import ImproperlyConfigured
  from rest_framework import serializers, viewsets, permissions
  from rest_framework.compat import include, patterns, url
  from rest_framework.decorators import link, action
  from rest_framework.response import Response
  from rest_framework.routers import SimpleRouter, DefaultRouter
  from rest_framework.test import APIRequestFactory
  
  factory = APIRequestFactory()
 
</s> remove             if route.mapping == {'{httpmethod}': '{methodname}'}:
 </s> add             if route.name == '{basename}-dynamic-{methodnamehyphen}': </s> remove                 dynamic_routes.append((httpmethods, methodname))
 </s> add                 if collection:
                    collection_routes.append((httpmethods, methodname))
                else:
                    dynamic_routes.append((httpmethods, methodname))
from rest_framework.decorators import link, action, collection_link, collection_action
  from django.test import TestCase
  from django.core.exceptions import ImproperlyConfigured
  from rest_framework import serializers, viewsets, permissions
  from rest_framework.compat import include, patterns, url
from rest_framework.decorators import link, action, collection_link, collection_action
  from rest_framework.response import Response
  from rest_framework.routers import SimpleRouter, DefaultRouter
  from rest_framework.test import APIRequestFactory
  
  factory = APIRequestFactory()
keep keep keep keep replace keep keep keep keep keep
 Add support for collection routes to SimpleRouter 
rest_framework/tests/test_routers.py