diff --git a/tests/grpc/test_annotation_mixin.py b/tests/grpc/test_annotation_mixin.py index 5ec7441..bdaf446 100644 --- a/tests/grpc/test_annotation_mixin.py +++ b/tests/grpc/test_annotation_mixin.py @@ -719,7 +719,7 @@ class TestAnnotationInvalidIds: """Tests for invalid ID handling across annotation RPCs.""" @pytest.mark.parametrize( - ("method_name", "request"), + ("method_name", "proto_request"), _INVALID_ID_TEST_CASES, ids=[ "add_annotation", @@ -734,14 +734,14 @@ class TestAnnotationInvalidIds: mock_annotations_repo: AsyncMock, mock_grpc_context: MagicMock, method_name: str, - request: object, + proto_request: object, ) -> None: """Annotation RPCs should abort on invalid IDs.""" servicer = MockServicerHost(mock_annotations_repo) method = getattr(servicer, method_name) with pytest.raises(AssertionError, match="Unreachable"): - await method(request, mock_grpc_context) + await method(proto_request, mock_grpc_context) mock_grpc_context.abort.assert_called_once() diff --git a/tests/grpc/test_entities_mixin.py b/tests/grpc/test_entities_mixin.py index 2d92058..260babb 100644 --- a/tests/grpc/test_entities_mixin.py +++ b/tests/grpc/test_entities_mixin.py @@ -537,7 +537,7 @@ class TestEntityNotFound: return MockServicerHost(mock_entities_repo, mock_meetings_repo) @pytest.mark.parametrize( - ("method_name", "request"), + ("method_name", "proto_request"), [ pytest.param( "UpdateEntity", @@ -564,14 +564,14 @@ class TestEntityNotFound: mock_entities_repo: AsyncMock, mock_grpc_context: MagicMock, method_name: str, - request: object, + proto_request: object, ) -> None: """Entity operations abort when entity does not exist.""" mock_entities_repo.get.return_value = None method = getattr(servicer, method_name) with pytest.raises(AssertionError, match="Unreachable"): - await method(request, mock_grpc_context) + await method(proto_request, mock_grpc_context) mock_grpc_context.abort.assert_called_once() diff --git a/tests/grpc/test_meeting_mixin.py b/tests/grpc/test_meeting_mixin.py index 39025ae..b6ce483 100644 --- a/tests/grpc/test_meeting_mixin.py +++ b/tests/grpc/test_meeting_mixin.py @@ -469,7 +469,7 @@ class TestMeetingNotFound: meetings_repo.delete.return_value = False @pytest.mark.parametrize( - ("method_name", "request", "configure"), + ("method_name", "proto_request", "configure"), [ pytest.param( "StopMeeting", @@ -497,7 +497,7 @@ class TestMeetingNotFound: meeting_mixin_meetings_repo: AsyncMock, mock_grpc_context: MagicMock, method_name: str, - request: object, + proto_request: object, configure: Callable[[AsyncMock], None], ) -> None: """Meeting operations abort with NOT_FOUND for missing meetings.""" @@ -505,7 +505,7 @@ class TestMeetingNotFound: method = getattr(meeting_mixin_servicer, method_name) with pytest.raises(AssertionError, match="Unreachable"): - await method(request, mock_grpc_context) + await method(proto_request, mock_grpc_context) mock_grpc_context.abort.assert_called_once() @@ -832,7 +832,7 @@ class TestInvalidMeetingIds: """Tests for invalid meeting id handling across operations.""" @pytest.mark.parametrize( - ("method_name", "request"), + ("method_name", "proto_request"), [ pytest.param( "StopMeeting", @@ -856,11 +856,11 @@ class TestInvalidMeetingIds: meeting_mixin_servicer: MeetingServicerProtocol, mock_grpc_context: MagicMock, method_name: str, - request: object, + proto_request: object, ) -> None: with pytest.raises(AssertionError, match="Unreachable"): method = getattr(meeting_mixin_servicer, method_name) - await method(request, mock_grpc_context) + await method(proto_request, mock_grpc_context) mock_grpc_context.abort.assert_called_once() diff --git a/tests/grpc/test_oidc_mixin.py b/tests/grpc/test_oidc_mixin.py index 7abde2b..55af522 100644 --- a/tests/grpc/test_oidc_mixin.py +++ b/tests/grpc/test_oidc_mixin.py @@ -486,7 +486,7 @@ class TestOidcProviderNotFound: mock_service.registry.remove_provider = MagicMock(return_value=False) @pytest.mark.parametrize( - ("method_name", "request", "configure"), + ("method_name", "proto_request", "configure"), [ pytest.param( "GetOidcProvider", @@ -516,7 +516,7 @@ class TestOidcProviderNotFound: oidc_servicer: MockServicerHost, mock_grpc_context: MagicMock, method_name: str, - request: object, + proto_request: object, configure: Callable[[MagicMock], None], ) -> None: """OIDC provider operations abort when provider is missing.""" @@ -527,7 +527,7 @@ class TestOidcProviderNotFound: method = getattr(oidc_servicer, method_name) with pytest.raises(AssertionError, match="Unreachable"): - await method(request, mock_grpc_context) + await method(proto_request, mock_grpc_context) mock_grpc_context.abort.assert_called_once() diff --git a/tests/grpc/test_project_mixin.py b/tests/grpc/test_project_mixin.py index 50535a8..07034b7 100644 --- a/tests/grpc/test_project_mixin.py +++ b/tests/grpc/test_project_mixin.py @@ -479,7 +479,7 @@ class TestProjectNotFound: """Tests for project RPCs returning NOT_FOUND.""" @pytest.mark.parametrize( - ("method_name", "service_attr", "request"), + ("method_name", "service_attr", "proto_request"), _PROJECT_NOT_FOUND_TEST_CASES, ids=_PROJECT_NOT_FOUND_IDS, ) @@ -490,14 +490,14 @@ class TestProjectNotFound: mock_grpc_context: MagicMock, method_name: str, service_attr: str, - request: object, + proto_request: object, ) -> None: """Project RPCs should abort when service returns None.""" getattr(mockproject_service, service_attr).return_value = None method = getattr(project_mixin_servicer, method_name) with pytest.raises(AssertionError, match="Unreachable"): - await method(request, mock_grpc_context) + await method(proto_request, mock_grpc_context) mock_grpc_context.abort.assert_called_once() diff --git a/tests/grpc/test_sync_orchestration.py b/tests/grpc/test_sync_orchestration.py index 66faa5c..3626d95 100644 --- a/tests/grpc/test_sync_orchestration.py +++ b/tests/grpc/test_sync_orchestration.py @@ -811,7 +811,7 @@ class TestNotFoundStatusCode: @pytest.mark.asyncio @pytest.mark.parametrize( - ("call_method", "request", "label"), + ("call_method", "proto_request", "label"), [ pytest.param( _call_start_sync, @@ -831,14 +831,14 @@ class TestNotFoundStatusCode: self, servicer_with_success: NoteFlowServicer, call_method: CallMethod, - request: object, + proto_request: object, label: str, ) -> None: """Sync operations abort with NOT_FOUND for missing IDs.""" context = _DummyContext() with pytest.raises(AssertionError, match="abort called"): - await call_method(servicer_with_success, request, context) + await call_method(servicer_with_success, proto_request, context) assert context.aborted, f"Should abort for nonexistent {label}" assert context.abort_code == _get_status_code_not_found(), "Code should be NOT_FOUND" diff --git a/tests/grpc/test_webhooks_mixin.py b/tests/grpc/test_webhooks_mixin.py index f026bca..d8e2fc1 100644 --- a/tests/grpc/test_webhooks_mixin.py +++ b/tests/grpc/test_webhooks_mixin.py @@ -500,7 +500,7 @@ class TestWebhookInvalidIds: """Tests for invalid webhook_id handling.""" @pytest.mark.parametrize( - ("method_name", "request"), + ("method_name", "proto_request"), [ pytest.param( "UpdateWebhook", @@ -527,12 +527,12 @@ class TestWebhookInvalidIds: webhooks_servicer: MockServicerHost, mock_grpc_context: MagicMock, method_name: str, - request: object, + proto_request: object, ) -> None: """Webhook RPCs should reject invalid webhook_id values.""" method = getattr(webhooks_servicer, method_name) with pytest.raises(AssertionError, match="Unreachable"): - await method(request, mock_grpc_context) + await method(proto_request, mock_grpc_context) mock_grpc_context.abort.assert_called_once() diff --git a/tests/integration/test_e2e_annotations.py b/tests/integration/test_e2e_annotations.py index 01f497e..f5abb84 100644 --- a/tests/integration/test_e2e_annotations.py +++ b/tests/integration/test_e2e_annotations.py @@ -438,7 +438,7 @@ class TestAnnotationErrors: ) @pytest.mark.parametrize( - ("method_name", "request", "label"), + ("method_name", "proto_request", "label"), [ pytest.param( "GetAnnotation", @@ -467,7 +467,7 @@ class TestAnnotationErrors: self, session_factory: async_sessionmaker[AsyncSession], method_name: str, - request: object, + proto_request: object, label: str, ) -> None: """Annotation operations should return NOT_FOUND when missing.""" @@ -476,7 +476,7 @@ class TestAnnotationErrors: method = getattr(servicer, method_name) with pytest.raises(grpc.RpcError, match=r".*"): - await method(request, context) + await method(proto_request, context) assert context.abort_code == grpc.StatusCode.NOT_FOUND, ( f"expected NOT_FOUND status code for {label} nonexistent annotation, got {context.abort_code}" diff --git a/tests/integration/test_error_handling.py b/tests/integration/test_error_handling.py index 6688808..d0230da 100644 --- a/tests/integration/test_error_handling.py +++ b/tests/integration/test_error_handling.py @@ -82,7 +82,7 @@ class TestInvalidInputHandling: ) @pytest.mark.parametrize( - ("method_name", "request"), + ("method_name", "proto_request"), [ pytest.param( "GetMeeting", @@ -100,14 +100,14 @@ class TestInvalidInputHandling: self, session_factory: async_sessionmaker[AsyncSession], method_name: str, - request: object, + proto_request: object, ) -> None: servicer = NoteFlowServicer(session_factory=session_factory) context = MockContext() with pytest.raises(grpc.RpcError, match=r".*"): method = getattr(servicer, method_name) - await method(request, context) + await method(proto_request, context) assert context.abort_code == grpc.StatusCode.NOT_FOUND, ( f"expected NOT_FOUND for nonexistent meeting, got {context.abort_code}"