  from rest_framework.response import Response
  from rest_framework.routers import SimpleRouter, DefaultRouter
  from rest_framework.test import APIRequestFactory
  
  factory = APIRequestFactory()
  
  urlpatterns = patterns('',)
  
 
</s> remove             self.assertEqual(route.mapping[method_map], endpoint)
 </s> add             self.assertEqual(route.mapping[method_map], method_name) </s> remove                                  '^{{prefix}}/{{lookup}}/{0}{{trailing_slash}}$'.format(endpoint))
 </s> add                                  '^{{prefix}}/{{lookup}}/{0}{{trailing_slash}}$'.format(custom_method_name)) </s> remove             if endpoint.endswith('_post'):
 </s> add             if method_name.endswith('_post'): </s> remove             if endpoint.startswith('list_'):
 </s> add             method_name = endpoint.method_name
            custom_method_name = endpoint.custom_method_name

            if method_name.startswith('list_'):
from collections import namedtuple
  from rest_framework.response import Response
  from rest_framework.routers import SimpleRouter, DefaultRouter
  from rest_framework.test import APIRequestFactory
from collections import namedtuple
  
  factory = APIRequestFactory()
  
  urlpatterns = patterns('',)
  
keep keep add keep keep keep keep keep
 Tests for validating custom_method_name router attribute 
tests/test_routers.py