mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 00:49:49 +03:00
Add test for y -> ies plural endings
This commit is contained in:
parent
e135ea88ba
commit
c0af5ba3b6
|
@ -666,6 +666,21 @@ class TestOperationIntrospection(TestCase):
|
|||
operationId = inspector.get_operation_id(path, method)
|
||||
assert operationId == 'listUlysses'
|
||||
|
||||
def test_operation_id_ies_plural(self):
|
||||
path = '/'
|
||||
method = 'GET'
|
||||
|
||||
view = create_view(
|
||||
views.ExampleGenericAPIView,
|
||||
method,
|
||||
create_request(path),
|
||||
)
|
||||
inspector = AutoSchema(operation_id_base='Entry')
|
||||
inspector.view = view
|
||||
|
||||
operationId = inspector.get_operation_id(path, method)
|
||||
assert operationId == 'listEntries'
|
||||
|
||||
def test_operation_id_override_get(self):
|
||||
class CustomSchema(AutoSchema):
|
||||
def get_operation_id(self, path, method):
|
||||
|
|
Loading…
Reference in New Issue
Block a user