  
      def test_uninitialized_view(self):
          self.assertEqual(ActionViewSet().get_extra_action_url_map(), OrderedDict())
  
  
  @override_settings(ROOT_URLCONF='tests.test_viewsets')
  class ReverseActionTests(TestCase):
      def test_default_basename(self):
          view = ActionViewSet()
 
</s> remove         func.name = name if name else pretty_name(func.__name__)
 </s> add  </s> remove                 action_urls[action.name] = url
 </s> add                 view = self.__class__(**action.kwargs)
                action_urls[view.get_view_name()] = url </s> remove     Given a view class, return a textual name to represent the view.
 </s> add     Given a view instance, return a textual name to represent the view.
    def test_action_names(self):
        # Action 'name' and 'suffix' kwargs should be respected
        response = self.client.get('/api/names/1/')
        view = response.renderer_context['view']

        expected = OrderedDict([
            ('Custom Name', 'http://testserver/api/names/1/named_action/'),
            ('Action Names Custom Suffix', 'http://testserver/api/names/1/suffixed_action/'),
            ('Unnamed action', 'http://testserver/api/names/1/unnamed_action/'),
        ])

        self.assertEqual(view.get_extra_action_url_map(), expected)

  
      def test_uninitialized_view(self):
          self.assertEqual(ActionViewSet().get_extra_action_url_map(), OrderedDict())
  
    def test_action_names(self):
        # Action 'name' and 'suffix' kwargs should be respected
        response = self.client.get('/api/names/1/')
        view = response.renderer_context['view']

        expected = OrderedDict([
            ('Custom Name', 'http://testserver/api/names/1/named_action/'),
            ('Action Names Custom Suffix', 'http://testserver/api/names/1/suffixed_action/'),
            ('Unnamed action', 'http://testserver/api/names/1/unnamed_action/'),
        ])

        self.assertEqual(view.get_extra_action_url_map(), expected)

  
  @override_settings(ROOT_URLCONF='tests.test_viewsets')
  class ReverseActionTests(TestCase):
      def test_default_basename(self):
          view = ActionViewSet()
keep keep keep add keep keep keep keep keep
 Fix action support for ViewSet suffixes (#6081)

* Add suffix support for actions

Removes the newly introduced `action.name` in favor of leveraging the
View's `.get_view_name()` method, which supports both name and suffix.

* Fix view description func docstrings

* Test action decorator name & suffix kwargs

* Adjust 'extra action' docs 
tests/test_viewsets.py