diff --git a/tests/test_schemas.py b/tests/test_schemas.py index 197e62eb0..c86a82c3c 100644 --- a/tests/test_schemas.py +++ b/tests/test_schemas.py @@ -45,7 +45,7 @@ class ExampleViewSet(ModelViewSet): def custom_action(self, request, pk): return super(ExampleSerializer, self).retrieve(self, request) - @list_route() + @list_route(methods=['get', 'post']) def custom_list_action(self, request): return super(ExampleViewSet, self).list(self, request) @@ -99,6 +99,10 @@ class TestRouterGeneratedSchema(TestCase): url='/example/custom_list_action/', action='get' ), + 'custom_list_action': coreapi.Link( + url='/example/custom_list_action/', + action='post' + ), 'retrieve': coreapi.Link( url='/example/{pk}/', action='get',