Team Ai
Apppublic

Underground-Digital/Workflow-Engine

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
test_provider.py26 linesDownload Raw Back to minimax
1import os2 3import pytest4 5from core.model_runtime.errors.validate import CredentialsValidateFailedError6from core.model_runtime.model_providers.minimax.minimax import MinimaxProvider7 8 9def test_validate_provider_credentials():10    provider = MinimaxProvider()11 12    with pytest.raises(CredentialsValidateFailedError):13        provider.validate_provider_credentials(14            credentials={15                "minimax_api_key": "hahahaha",16                "minimax_group_id": "123",17            }18        )19 20    provider.validate_provider_credentials(21        credentials={22            "minimax_api_key": os.environ.get("MINIMAX_API_KEY"),23            "minimax_group_id": os.environ.get("MINIMAX_GROUP_ID"),24        }25    )26