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.
This commit is contained in:
Federico Kamelhar 2026-05-18 11:36:14 -04:00
parent 02c1a3daf7
commit 5d65fdb4d8

View file

@ -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"},