From 5d65fdb4d843be57bb277f6ea4db44b72daff3b6 Mon Sep 17 00:00:00 2001 From: Federico Kamelhar Date: Mon, 18 May 2026 11:36:14 -0400 Subject: [PATCH] test(oci): repoint TestOCIKeyNormalization to sign_with_manual_credentials The signing helper moved from OCIChatConfig._sign_with_manual_credentials to a module-level sign_with_manual_credentials in common_utils.py. Four tests in TestOCIKeyNormalization still called the old method: - 2 failed outright with AttributeError - 2 passed by accident because they used pytest.raises(Exception), which happily caught the AttributeError instead of exercising the intended OCIError path Repoint all four to the new module-level function so they exercise the actual oci_key type-validation branch. --- .../llms/oci/chat/test_oci_chat_transformation.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/litellm/llms/oci/chat/test_oci_chat_transformation.py b/tests/litellm/llms/oci/chat/test_oci_chat_transformation.py index f96228a4ccc..e9b3f82d1a7 100644 --- a/tests/litellm/llms/oci/chat/test_oci_chat_transformation.py +++ b/tests/litellm/llms/oci/chat/test_oci_chat_transformation.py @@ -14,7 +14,7 @@ sys.path.insert( ) # Adds the parent directory to the system path from litellm.llms.oci.chat.transformation import OCIChatConfig -from litellm.llms.oci.common_utils import OCIError +from litellm.llms.oci.common_utils import OCIError, sign_with_manual_credentials @pytest.fixture @@ -41,7 +41,7 @@ class TestOCIKeyNormalization: # We can't fully test signing without a real key, but we can verify # the error message indicates the key was processed (not a type error) with pytest.raises(Exception) as exc_info: - config._sign_with_manual_credentials( + sign_with_manual_credentials( headers={}, optional_params=optional_params, request_data={"test": "data"}, @@ -67,7 +67,7 @@ class TestOCIKeyNormalization: } with pytest.raises(Exception) as exc_info: - config._sign_with_manual_credentials( + sign_with_manual_credentials( headers={}, optional_params=optional_params, request_data={"test": "data"}, @@ -88,7 +88,7 @@ class TestOCIKeyNormalization: } with pytest.raises(OCIError) as exc_info: - config._sign_with_manual_credentials( + sign_with_manual_credentials( headers={}, optional_params=optional_params, request_data={"test": "data"}, @@ -110,7 +110,7 @@ class TestOCIKeyNormalization: } with pytest.raises(OCIError) as exc_info: - config._sign_with_manual_credentials( + sign_with_manual_credentials( headers={}, optional_params=optional_params, request_data={"test": "data"},