You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_provider.py 595B

1234567891011121314151617181920
  1. import os
  2. import pytest
  3. from core.model_runtime.errors.validate import CredentialsValidateFailedError
  4. from core.model_runtime.model_providers.oci.oci import OCIGENAIProvider
  5. def test_validate_provider_credentials():
  6. provider = OCIGENAIProvider()
  7. with pytest.raises(CredentialsValidateFailedError):
  8. provider.validate_provider_credentials(credentials={})
  9. provider.validate_provider_credentials(
  10. credentials={
  11. "oci_config_content": os.environ.get("OCI_CONFIG_CONTENT"),
  12. "oci_key_content": os.environ.get("OCI_KEY_CONTENT"),
  13. }
  14. )