fixes to tests
This commit is contained in:
parent
3a5b708d53
commit
ffb2aad45d
5 changed files with 12 additions and 9 deletions
|
|
@ -199,6 +199,7 @@ class SeriesCharacterChainNode(FrontendNode):
|
|||
"Chain",
|
||||
"ConversationChain",
|
||||
"SeriesCharacterChain",
|
||||
"function",
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ def test_initialize_agent(client: TestClient):
|
|||
agents = json_response["agents"]
|
||||
|
||||
initialize_agent = agents["initialize_agent"]
|
||||
assert initialize_agent["base_classes"] == ["AgentExecutor"]
|
||||
assert initialize_agent["base_classes"] == ["AgentExecutor", "function"]
|
||||
template = initialize_agent["template"]
|
||||
|
||||
assert template["agent"] == {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,12 @@ def test_conversation_chain(client: TestClient):
|
|||
chain = chains["ConversationChain"]
|
||||
|
||||
# Test the base classes, template, memory, verbose, llm, input_key, output_key, and _type objects
|
||||
assert set(chain["base_classes"]) == {"LLMChain", "ConversationChain", "Chain"}
|
||||
assert set(chain["base_classes"]) == {
|
||||
"function",
|
||||
"LLMChain",
|
||||
"ConversationChain",
|
||||
"Chain",
|
||||
}
|
||||
template = chain["template"]
|
||||
assert template["memory"] == {
|
||||
"required": False,
|
||||
|
|
@ -96,7 +101,7 @@ def test_llm_chain(client: TestClient):
|
|||
chain = chains["LLMChain"]
|
||||
|
||||
# Test the base classes, template, memory, verbose, llm, input_key, output_key, and _type objects
|
||||
assert set(chain["base_classes"]) == {"LLMChain", "Chain"}
|
||||
assert set(chain["base_classes"]) == {"function", "LLMChain", "Chain"}
|
||||
template = chain["template"]
|
||||
assert template["memory"] == {
|
||||
"required": False,
|
||||
|
|
@ -154,7 +159,7 @@ def test_llm_checker_chain(client: TestClient):
|
|||
chain = chains["LLMCheckerChain"]
|
||||
|
||||
# Test the base classes, template, memory, verbose, llm, input_key, output_key, and _type objects
|
||||
assert set(chain["base_classes"]) == {"LLMCheckerChain", "Chain"}
|
||||
assert set(chain["base_classes"]) == {"function", "LLMCheckerChain", "Chain"}
|
||||
template = chain["template"]
|
||||
assert template["memory"] == {
|
||||
"required": False,
|
||||
|
|
@ -231,7 +236,7 @@ def test_llm_math_chain(client: TestClient):
|
|||
chain = chains["LLMMathChain"]
|
||||
|
||||
# Test the base classes, template, memory, verbose, llm, input_key, output_key, and _type objects
|
||||
assert set(chain["base_classes"]) == {"LLMMathChain", "Chain"}
|
||||
assert set(chain["base_classes"]) == {"function", "LLMMathChain", "Chain"}
|
||||
template = chain["template"]
|
||||
assert template["memory"] == {
|
||||
"required": False,
|
||||
|
|
@ -310,6 +315,7 @@ def test_series_character_chain(client: TestClient):
|
|||
|
||||
# Test the base classes, template, memory, verbose, llm, input_key, output_key, and _type objects
|
||||
assert set(chain["base_classes"]) == {
|
||||
"function",
|
||||
"LLMChain",
|
||||
"BaseCustomChain",
|
||||
"Chain",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import json
|
||||
from typing import Type, Union
|
||||
|
||||
import pytest
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import json
|
||||
from unittest.mock import patch
|
||||
from langflow.api.schemas import ChatMessage
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
|
||||
|
|
@ -11,8 +10,6 @@ def test_websocket_connection(client: TestClient):
|
|||
|
||||
|
||||
def test_chat_history(client: TestClient):
|
||||
chat_history = []
|
||||
|
||||
# Mock the process_graph function to return a specific value
|
||||
with patch("langflow.api.chat_manager.process_graph") as mock_process_graph:
|
||||
mock_process_graph.return_value = ("Hello, I'm a mock response!", "")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue