From c39c01db8c46cdcd51986f47d68e6dc81587835b Mon Sep 17 00:00:00 2001 From: Haim Kastner Date: Tue, 9 Jun 2026 08:35:48 +0300 Subject: [PATCH] Align DLP policy tests to ChatsPolicy.event_types (array) The policy spec renamed ChatsPolicy.event_type (singular scalar) to event_types (array of DLPEventType, minItems 1). The runtime still accepts the legacy singular form, but the generated type only exposes event_types, so the strongly-typed test fixtures no longer compiled. Updated the DLP rule fixtures to event_types=[...] to match the regenerated SDK. Co-Authored-By: Claude Opus 4.8 --- tests/test_async_api.py | 4 ++-- tests/test_unit_api.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_async_api.py b/tests/test_async_api.py index de5eea8..ba9353f 100644 --- a/tests/test_async_api.py +++ b/tests/test_async_api.py @@ -84,7 +84,7 @@ async def _test(): description='Async integration test', order=0, policy=ChatsPolicy( - event_type=DLPEventType.FILE_UPLOAD, + event_types=[DLPEventType.FILE_UPLOAD], action='prevent', logging=LoggingStatus.ENABLED, services_and_application=ServicesAndApplication(mode=SelectionMode.ALL), @@ -317,7 +317,7 @@ async def _test(): description='Async toggle test', order=0, policy=ChatsPolicy( - event_type=DLPEventType.PROMPT, + event_types=[DLPEventType.PROMPT], action='block', logging=LoggingStatus.ENABLED, services_and_application=ServicesAndApplication(mode=SelectionMode.ALL), diff --git a/tests/test_unit_api.py b/tests/test_unit_api.py index 8fa9269..6d60525 100644 --- a/tests/test_unit_api.py +++ b/tests/test_unit_api.py @@ -78,7 +78,7 @@ def test_genai_chats_rule_crud(self): description='Integration test', order=0, policy=ChatsPolicy( - event_type=DLPEventType.FILE_UPLOAD, + event_types=[DLPEventType.FILE_UPLOAD], action='prevent', logging=LoggingStatus.ENABLED, services_and_application=ServicesAndApplication(mode=SelectionMode.ALL), @@ -292,7 +292,7 @@ def test_set_active_toggle(self): description='Toggle test', order=0, policy=ChatsPolicy( - event_type=DLPEventType.PROMPT, + event_types=[DLPEventType.PROMPT], action='block', logging=LoggingStatus.ENABLED, services_and_application=ServicesAndApplication(mode=SelectionMode.ALL),