      def test_link_and_action_decorator(self):
          routes = self.router.get_routes(BasicViewSet)
          decorator_routes = routes[2:]
          # Make sure all these endpoints exist and none have been clobbered
          for i, endpoint in enumerate(['action1', 'action2', 'link1', 'link2']):
              route = decorator_routes[i]
              # check url listing
              self.assertEqual(route.url,
                               '^{{prefix}}/{{lookup}}/{0}/$'.format(endpoint))
              # check method to function mapping
 
</s> remove             if endpoint.startswith('action'):
                method_map = 'post'
 </s> add             if endpoint == 'action3':
                methods_map = ['post', 'delete']
            elif endpoint.startswith('action'):
                methods_map = ['post'] </s> remove                 method_map = 'get'
            self.assertEqual(route.mapping[method_map], endpoint)


 </s> add                 methods_map = ['get']
            for method in methods_map:
                self.assertEqual(route.mapping[method], endpoint) </s> remove             httpmethod = getattr(attr, 'bind_to_method', None)
            if httpmethod:
                dynamic_routes.append((httpmethod, methodname))
 </s> add             httpmethods = getattr(attr, 'bind_to_methods', None)
            if httpmethods:
                dynamic_routes.append((httpmethods, methodname)) </s> remove                 for httpmethod, methodname in dynamic_routes:
 </s> add                 for httpmethods, methodname in dynamic_routes: </s> remove                         mapping={httpmethod: methodname},
 </s> add                         mapping=dict((httpmethod, methodname) for httpmethod in httpmethods),
        for i, endpoint in enumerate(['action1', 'action2', 'action3', 'link1', 'link2']):
      def test_link_and_action_decorator(self):
          routes = self.router.get_routes(BasicViewSet)
          decorator_routes = routes[2:]
          # Make sure all these endpoints exist and none have been clobbered
        for i, endpoint in enumerate(['action1', 'action2', 'action3', 'link1', 'link2']):
              route = decorator_routes[i]
              # check url listing
              self.assertEqual(route.url,
                               '^{{prefix}}/{{lookup}}/{0}/$'.format(endpoint))
              # check method to function mapping
keep keep keep keep replace keep keep keep keep keep
 Allow action decorator to handle multiple http methods 
rest_framework/tests/routers.py