mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-28 01:32:17 +00:00
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:
parent
02c1a3daf7
commit
5d65fdb4d8
1 changed files with 5 additions and 5 deletions
|
|
@ -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"},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue