Refactor imports and update function names
This commit is contained in:
parent
a41ada87ee
commit
abe4925cc3
8 changed files with 156 additions and 314 deletions
|
|
@ -1,6 +1,5 @@
|
|||
from fastapi.testclient import TestClient
|
||||
|
||||
|
||||
# def test_chains_settings(client: TestClient, logged_in_headers):
|
||||
# response = client.get("api/v1/all", headers=logged_in_headers)
|
||||
# assert response.status_code == 200
|
||||
|
|
@ -18,13 +17,7 @@ def test_conversation_chain(client: TestClient, logged_in_headers):
|
|||
|
||||
chain = chains["ConversationChain"]
|
||||
# Test the base classes, template, memory, verbose, llm, input_key, output_key, and _type objects
|
||||
assert set(chain["base_classes"]) == {
|
||||
"ConversationChain",
|
||||
"LLMChain",
|
||||
"Chain",
|
||||
"function",
|
||||
"Text",
|
||||
}
|
||||
assert set(chain["base_classes"]) == {"Callable", "Chain"}
|
||||
|
||||
template = chain["template"]
|
||||
assert template["memory"] == {
|
||||
|
|
@ -97,10 +90,7 @@ def test_conversation_chain(client: TestClient, logged_in_headers):
|
|||
assert template["_type"] == "ConversationChain"
|
||||
|
||||
# Test the description object
|
||||
assert (
|
||||
chain["description"]
|
||||
== "Chain to have a conversation and load context from memory."
|
||||
)
|
||||
assert chain["description"] == "Chain to have a conversation and load context from memory."
|
||||
|
||||
|
||||
def test_llm_chain(client: TestClient, logged_in_headers):
|
||||
|
|
@ -287,10 +277,7 @@ def test_llm_math_chain(client: TestClient, logged_in_headers):
|
|||
assert template["_type"] == "LLMMathChain"
|
||||
|
||||
# Test the description object
|
||||
assert (
|
||||
chain["description"]
|
||||
== "Chain that interprets a prompt and executes python code to do math."
|
||||
)
|
||||
assert chain["description"] == "Chain that interprets a prompt and executes python code to do math."
|
||||
|
||||
|
||||
def test_series_character_chain(client: TestClient, logged_in_headers):
|
||||
|
|
@ -396,10 +383,7 @@ def test_mid_journey_prompt_chain(client: TestClient, logged_in_headers):
|
|||
"info": "",
|
||||
}
|
||||
# Test the description object
|
||||
assert (
|
||||
chain["description"]
|
||||
== "MidJourneyPromptChain is a chain you can use to generate new MidJourney prompts."
|
||||
)
|
||||
assert chain["description"] == "MidJourneyPromptChain is a chain you can use to generate new MidJourney prompts."
|
||||
|
||||
|
||||
def test_time_travel_guide_chain(client: TestClient, logged_in_headers):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue