Skip to content

Merge pull request #2 from RomiconEZ/feature/jailbreak_attacks #6

Merge pull request #2 from RomiconEZ/feature/jailbreak_attacks

Merge pull request #2 from RomiconEZ/feature/jailbreak_attacks #6

GitHub Actions / JUnit Test Report failed Sep 11, 2024 in 0s

2 tests run, 1 passed, 0 skipped, 1 failed.

Annotations

Check failure on line 81 in tests/test_llamator.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_llamator.test_langchainclient_yandegpt

TypeError: str expected, not NoneType
Raw output
def test_langchainclient_yandegpt():
        """Тест клиента LangChain с использованием Yandex GPT."""
        # Загружаем переменные окружения из .env файла
        load_dotenv()
    
        # Перезагрузка необходимых модулей
        import llamator.client.specific_chat_clients
        import llamator.main
    
        importlib.reload(llamator.client.specific_chat_clients)
        importlib.reload(llamator.main)
    
        # Получаем переменные из окружения
        yc_api_key = os.getenv("YC_API_KEY")
        folder_ID = os.getenv("FOLDER_ID")
    
        # Устанавливаем API ключ в окружение
>       os.environ["YC_API_KEY"] = yc_api_key

tests/test_llamator.py:81: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
<frozen os>:684: in __setitem__
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

value = None

>   ???
E   TypeError: str expected, not NoneType

<frozen os>:758: TypeError