      def suffixed_action(self, request, *args, **kwargs):
          raise NotImplementedError
  
  
  router = SimpleRouter()
  router.register(r'actions', ActionViewSet)
  router.register(r'actions-alt', ActionViewSet, basename='actions-alt')
  router.register(r'names', ActionNamesViewSet, basename='names')
  router.register(r'mapping', ActionViewSetWithMapping, basename='mapping')
  
 
</s> remove     return hasattr(attr, 'mapping')
 </s> add     return hasattr(attr, 'mapping') and isinstance(attr.mapping, MethodMapper)
class ThingWithMapping:
    def __init__(self):
        self.mapping = {}


class ActionViewSetWithMapping(ActionViewSet):
    mapper = ThingWithMapping()


      def suffixed_action(self, request, *args, **kwargs):
          raise NotImplementedError
  
  
class ThingWithMapping:
    def __init__(self):
        self.mapping = {}


class ActionViewSetWithMapping(ActionViewSet):
    mapper = ThingWithMapping()


  router = SimpleRouter()
  router.register(r'actions', ActionViewSet)
  router.register(r'actions-alt', ActionViewSet, basename='actions-alt')
  router.register(r'names', ActionNamesViewSet, basename='names')
  router.register(r'mapping', ActionViewSetWithMapping, basename='mapping')
  
keep keep keep add keep keep keep keep keep keep
 Extra action detection is too permissive. Add failing test + fix (#7217)

* Add failing test

* Add failing test++

* Make get_extra_action less permissive 
tests/test_viewsets.py