Add test for y -> ies plural endings

This commit is contained in:
Matt Nawara 2020-07-31 10:42:46 -04:00
parent e135ea88ba
commit c0af5ba3b6

View File

@ -666,6 +666,21 @@ class TestOperationIntrospection(TestCase):
operationId = inspector.get_operation_id(path, method) operationId = inspector.get_operation_id(path, method)
assert operationId == 'listUlysses' 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): def test_operation_id_override_get(self):
class CustomSchema(AutoSchema): class CustomSchema(AutoSchema):
def get_operation_id(self, path, method): def get_operation_id(self, path, method):