From 242c49128e91aa0452e0033fa1ab2caab8099e3b Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 29 Aug 2016 15:39:05 +1000 Subject: [PATCH] Updated test (to fail) to show coreapi schema generator does not generate links for all methods on multimethod list_routes --- tests/test_schemas.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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',