Skip to content

Commit b0521a5

Browse files
author
David Sanders
committed
Added failing test to show coreapi schema generator does not generate links for all methods on multimethod list_routes
1 parent b683cd7 commit b0521a5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_schemas.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class ExampleViewSet(ModelViewSet):
4545
def custom_action(self, request, pk):
4646
return super(ExampleSerializer, self).retrieve(self, request)
4747

48-
@list_route()
48+
@list_route(methods=['get', 'post'])
4949
def custom_list_action(self, request):
5050
return super(ExampleViewSet, self).list(self, request)
5151

@@ -99,6 +99,10 @@ def test_anonymous_request(self):
9999
url='/example/custom_list_action/',
100100
action='get'
101101
),
102+
'custom_list_action': coreapi.Link(
103+
url='/example/custom_list_action/',
104+
action='post'
105+
),
102106
'retrieve': coreapi.Link(
103107
url='/example/{pk}/',
104108
action='get',

0 commit comments

Comments
 (0)