From c0af5ba3b6c6453b7bba2a7a361e164b2a7c5fa2 Mon Sep 17 00:00:00 2001 From: Matt Nawara Date: Fri, 31 Jul 2020 10:42:46 -0400 Subject: [PATCH] Add test for y -> ies plural endings --- tests/schemas/test_openapi.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/schemas/test_openapi.py b/tests/schemas/test_openapi.py index d483f3d45..5f936797f 100644 --- a/tests/schemas/test_openapi.py +++ b/tests/schemas/test_openapi.py @@ -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):