From 215c8d91b8590e9eda08aecc863095d01071ebea Mon Sep 17 00:00:00 2001 From: Swapna Lekkala Date: Wed, 6 Aug 2025 10:44:05 -0700 Subject: [PATCH] update test suite to moderations.create --- tests/integration/safety/test_safety.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/safety/test_safety.py b/tests/integration/safety/test_safety.py index 11fd828bc..9927bd3fa 100644 --- a/tests/integration/safety/test_safety.py +++ b/tests/integration/safety/test_safety.py @@ -70,7 +70,7 @@ def test_safe_examples_with_run_moderation(client_with_models, shield_id): shield = [shield for shield in client_with_models.shields.list() if shield.identifier == shield_id][0] model_id = shield.provider_resource_id for example in examples: - moderation_object = client_with_models.safety.create( + moderation_object = client_with_models.moderations.create( input=[example], model=model_id, ) @@ -90,7 +90,7 @@ def test_unsafe_examples_with_run_moderation(client_with_models, shield_id): shield = [shield for shield in client_with_models.shields.list() if shield.identifier == shield_id][0] model_id = shield.provider_resource_id for example in examples: - moderation_object = client_with_models.safety.create( + moderation_object = client_with_models.moderations.create( input=[example], model=model_id, )