              if endpoint.endswith('_post'):
                  method_map = 'post'
              else:
                  method_map = 'get'
              self.assertEqual(route.mapping[method_map], endpoint)
  
  
  class TestRootWithAListlessViewset(TestCase):
      def setUp(self):
          class NoteViewSet(mixins.RetrieveModelMixin,
 
</s> remove             if endpoint.endswith('_post'):
 </s> add             if method_name.endswith('_post'): </s> remove                                  '^{{prefix}}/{{lookup}}/{0}{{trailing_slash}}$'.format(endpoint))
 </s> add                                  '^{{prefix}}/{{lookup}}/{0}{{trailing_slash}}$'.format(custom_method_name)) </s> remove                                  '^{{prefix}}/{0}{{trailing_slash}}$'.format(endpoint))
 </s> add                                  '^{{prefix}}/{0}{{trailing_slash}}$'.format(custom_method_name)) </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_'):
            self.assertEqual(route.mapping[method_map], method_name)
              if endpoint.endswith('_post'):
                  method_map = 'post'
              else:
                  method_map = 'get'
            self.assertEqual(route.mapping[method_map], method_name)
  
  
  class TestRootWithAListlessViewset(TestCase):
      def setUp(self):
          class NoteViewSet(mixins.RetrieveModelMixin,
keep keep keep keep replace keep keep keep keep keep
 Tests for validating custom_method_name router attribute 
tests/test_routers.py