ref: Remove useless pytest.mark.asyncio (#4364)
This commit is contained in:
parent
dc4e0e5ce1
commit
df22924b0e
22 changed files with 0 additions and 53 deletions
|
|
@ -5,7 +5,6 @@ from tests.api_keys import get_openai_api_key
|
||||||
from tests.integration.utils import download_flow_from_github, run_json_flow
|
from tests.integration.utils import download_flow_from_github, run_json_flow
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
@pytest.mark.api_key_required
|
@pytest.mark.api_key_required
|
||||||
async def test_1_0_15_basic_prompting():
|
async def test_1_0_15_basic_prompting():
|
||||||
api_key = get_openai_api_key()
|
api_key = get_openai_api_key()
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ async def test_list_assistants():
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.api_key_required
|
@pytest.mark.api_key_required
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_create_assistants():
|
async def test_create_assistants():
|
||||||
from langflow.components.astra_assistants import AssistantsCreateAssistant
|
from langflow.components.astra_assistants import AssistantsCreateAssistant
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ def astradb_client():
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.api_key_required
|
@pytest.mark.api_key_required
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_base(astradb_client: AstraDB):
|
async def test_base(astradb_client: AstraDB):
|
||||||
from langflow.components.embeddings import OpenAIEmbeddingsComponent
|
from langflow.components.embeddings import OpenAIEmbeddingsComponent
|
||||||
|
|
||||||
|
|
@ -65,7 +64,6 @@ async def test_base(astradb_client: AstraDB):
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.api_key_required
|
@pytest.mark.api_key_required
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_astra_embeds_and_search():
|
async def test_astra_embeds_and_search():
|
||||||
application_token = get_astradb_application_token()
|
application_token = get_astradb_application_token()
|
||||||
api_endpoint = get_astradb_api_endpoint()
|
api_endpoint = get_astradb_api_endpoint()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import pytest
|
|
||||||
from langflow.components.helpers import ParseJSONDataComponent
|
from langflow.components.helpers import ParseJSONDataComponent
|
||||||
from langflow.components.inputs import ChatInput
|
from langflow.components.inputs import ChatInput
|
||||||
from langflow.schema import Data
|
from langflow.schema import Data
|
||||||
|
|
@ -7,7 +6,6 @@ from tests.integration.components.mock_components import TextToData
|
||||||
from tests.integration.utils import ComponentInputHandle, run_single_component
|
from tests.integration.utils import ComponentInputHandle, run_single_component
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_from_data():
|
async def test_from_data():
|
||||||
outputs = await run_single_component(
|
outputs = await run_single_component(
|
||||||
ParseJSONDataComponent,
|
ParseJSONDataComponent,
|
||||||
|
|
@ -34,7 +32,6 @@ async def test_from_data():
|
||||||
assert outputs["filtered_data"] == [Data(text="2")]
|
assert outputs["filtered_data"] == [Data(text="2")]
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_from_message():
|
async def test_from_message():
|
||||||
outputs = await run_single_component(
|
outputs = await run_single_component(
|
||||||
ParseJSONDataComponent,
|
ParseJSONDataComponent,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import pytest
|
|
||||||
from langflow.components.inputs import ChatInput
|
from langflow.components.inputs import ChatInput
|
||||||
from langflow.memory import get_messages
|
from langflow.memory import get_messages
|
||||||
from langflow.schema.message import Message
|
from langflow.schema.message import Message
|
||||||
|
|
@ -6,7 +5,6 @@ from langflow.schema.message import Message
|
||||||
from tests.integration.utils import run_single_component
|
from tests.integration.utils import run_single_component
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_default():
|
async def test_default():
|
||||||
outputs = await run_single_component(ChatInput, run_input="hello")
|
outputs = await run_single_component(ChatInput, run_input="hello")
|
||||||
assert isinstance(outputs["message"], Message)
|
assert isinstance(outputs["message"], Message)
|
||||||
|
|
@ -21,7 +19,6 @@ async def test_default():
|
||||||
assert outputs["message"].sender_name == "User"
|
assert outputs["message"].sender_name == "User"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_sender():
|
async def test_sender():
|
||||||
outputs = await run_single_component(
|
outputs = await run_single_component(
|
||||||
ChatInput, inputs={"sender": "Machine", "sender_name": "AI"}, run_input="hello"
|
ChatInput, inputs={"sender": "Machine", "sender_name": "AI"}, run_input="hello"
|
||||||
|
|
@ -32,7 +29,6 @@ async def test_sender():
|
||||||
assert outputs["message"].sender_name == "AI"
|
assert outputs["message"].sender_name == "AI"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_do_not_store_messages():
|
async def test_do_not_store_messages():
|
||||||
session_id = "test-session-id"
|
session_id = "test-session-id"
|
||||||
outputs = await run_single_component(
|
outputs = await run_single_component(
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
import pytest
|
|
||||||
from langflow.components.inputs import TextInputComponent
|
from langflow.components.inputs import TextInputComponent
|
||||||
from langflow.schema.message import Message
|
from langflow.schema.message import Message
|
||||||
|
|
||||||
from tests.integration.utils import run_single_component
|
from tests.integration.utils import run_single_component
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_text_input():
|
async def test_text_input():
|
||||||
outputs = await run_single_component(TextInputComponent, run_input="sample text", input_type="text")
|
outputs = await run_single_component(TextInputComponent, run_input="sample text", input_type="text")
|
||||||
assert isinstance(outputs["text"], Message)
|
assert isinstance(outputs["text"], Message)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ from langflow.components.prompts import PromptComponent
|
||||||
from tests.integration.utils import ComponentInputHandle, run_single_component
|
from tests.integration.utils import ComponentInputHandle, run_single_component
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
@pytest.mark.api_key_required
|
@pytest.mark.api_key_required
|
||||||
async def test_csv_output_parser_openai():
|
async def test_csv_output_parser_openai():
|
||||||
format_instructions = ComponentInputHandle(
|
format_instructions = ComponentInputHandle(
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import pytest
|
|
||||||
from langflow.components.outputs import ChatOutput
|
from langflow.components.outputs import ChatOutput
|
||||||
from langflow.memory import get_messages
|
from langflow.memory import get_messages
|
||||||
from langflow.schema.message import Message
|
from langflow.schema.message import Message
|
||||||
|
|
@ -6,7 +5,6 @@ from langflow.schema.message import Message
|
||||||
from tests.integration.utils import run_single_component
|
from tests.integration.utils import run_single_component
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_string():
|
async def test_string():
|
||||||
outputs = await run_single_component(ChatOutput, inputs={"input_value": "hello"})
|
outputs = await run_single_component(ChatOutput, inputs={"input_value": "hello"})
|
||||||
assert isinstance(outputs["message"], Message)
|
assert isinstance(outputs["message"], Message)
|
||||||
|
|
@ -15,7 +13,6 @@ async def test_string():
|
||||||
assert outputs["message"].sender_name == "AI"
|
assert outputs["message"].sender_name == "AI"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_message():
|
async def test_message():
|
||||||
outputs = await run_single_component(ChatOutput, inputs={"input_value": Message(text="hello")})
|
outputs = await run_single_component(ChatOutput, inputs={"input_value": Message(text="hello")})
|
||||||
assert isinstance(outputs["message"], Message)
|
assert isinstance(outputs["message"], Message)
|
||||||
|
|
@ -24,7 +21,6 @@ async def test_message():
|
||||||
assert outputs["message"].sender_name == "AI"
|
assert outputs["message"].sender_name == "AI"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_do_not_store_message():
|
async def test_do_not_store_message():
|
||||||
session_id = "test-session-id"
|
session_id = "test-session-id"
|
||||||
outputs = await run_single_component(
|
outputs = await run_single_component(
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
import pytest
|
|
||||||
from langflow.components.outputs import TextOutputComponent
|
from langflow.components.outputs import TextOutputComponent
|
||||||
from langflow.schema.message import Message
|
from langflow.schema.message import Message
|
||||||
|
|
||||||
from tests.integration.utils import run_single_component
|
from tests.integration.utils import run_single_component
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test():
|
async def test():
|
||||||
outputs = await run_single_component(TextOutputComponent, inputs={"input_value": "hello"})
|
outputs = await run_single_component(TextOutputComponent, inputs={"input_value": "hello"})
|
||||||
assert isinstance(outputs["text"], Message)
|
assert isinstance(outputs["text"], Message)
|
||||||
|
|
@ -14,7 +12,6 @@ async def test():
|
||||||
assert outputs["text"].sender_name is None
|
assert outputs["text"].sender_name is None
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_message():
|
async def test_message():
|
||||||
outputs = await run_single_component(TextOutputComponent, inputs={"input_value": Message(text="hello")})
|
outputs = await run_single_component(TextOutputComponent, inputs={"input_value": Message(text="hello")})
|
||||||
assert isinstance(outputs["text"], Message)
|
assert isinstance(outputs["text"], Message)
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
import pytest
|
|
||||||
from langflow.components.prompts import PromptComponent
|
from langflow.components.prompts import PromptComponent
|
||||||
from langflow.schema.message import Message
|
from langflow.schema.message import Message
|
||||||
|
|
||||||
from tests.integration.utils import run_single_component
|
from tests.integration.utils import run_single_component
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test():
|
async def test():
|
||||||
outputs = await run_single_component(PromptComponent, inputs={"template": "test {var1}", "var1": "from the var"})
|
outputs = await run_single_component(PromptComponent, inputs={"template": "test {var1}", "var1": "from the var"})
|
||||||
assert isinstance(outputs["prompt"], Message)
|
assert isinstance(outputs["prompt"], Message)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import pytest
|
|
||||||
from langflow.components.inputs import ChatInput
|
from langflow.components.inputs import ChatInput
|
||||||
from langflow.components.outputs import ChatOutput
|
from langflow.components.outputs import ChatOutput
|
||||||
from langflow.components.prompts import PromptComponent
|
from langflow.components.prompts import PromptComponent
|
||||||
|
|
@ -8,7 +7,6 @@ from langflow.schema.message import Message
|
||||||
from tests.integration.utils import run_flow
|
from tests.integration.utils import run_flow
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_simple_no_llm():
|
async def test_simple_no_llm():
|
||||||
graph = Graph()
|
graph = Graph()
|
||||||
flow_input = graph.add_component(ChatInput())
|
flow_input = graph.add_component(ChatInput())
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ from langflow.components.tools.calculator import CalculatorToolComponent
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.api_key_required
|
@pytest.mark.api_key_required
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_agent_component_with_calculator():
|
async def test_agent_component_with_calculator():
|
||||||
# Mock inputs
|
# Mock inputs
|
||||||
tools = [CalculatorToolComponent().build_tool()] # Use the Calculator component as a tool
|
tools = [CalculatorToolComponent().build_tool()] # Use the Calculator component as a tool
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ from langflow.components.tools.calculator import CalculatorToolComponent
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.api_key_required
|
@pytest.mark.api_key_required
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_tool_calling_agent_component():
|
async def test_tool_calling_agent_component():
|
||||||
tools = [CalculatorToolComponent().build_tool()] # Use the Calculator component as a tool
|
tools = [CalculatorToolComponent().build_tool()] # Use the Calculator component as a tool
|
||||||
input_value = "What is 2 + 2?"
|
input_value = "What is 2 + 2?"
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,6 @@ def test_update_build_config_exceed_limit(create_data_component):
|
||||||
create_data_component.update_build_config(build_config, 16, "number_of_fields")
|
create_data_component.update_build_config(build_config, 16, "number_of_fields")
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_build_data(create_data_component):
|
async def test_build_data(create_data_component):
|
||||||
create_data_component._attributes = {
|
create_data_component._attributes = {
|
||||||
"field_1_key": {"key1": "value1"},
|
"field_1_key": {"key1": "value1"},
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,6 @@ def test_update_build_config_exceed_limit(update_data_component):
|
||||||
update_data_component.update_build_config(build_config, 16, "number_of_fields")
|
update_data_component.update_build_config(build_config, 16, "number_of_fields")
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_build_data(update_data_component):
|
async def test_build_data(update_data_component):
|
||||||
update_data_component._attributes = {
|
update_data_component._attributes = {
|
||||||
"field_1_key": {"key1": "new_value1"},
|
"field_1_key": {"key1": "new_value1"},
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ class TestEventManager:
|
||||||
assert manager.events["on_test_event"].func == manager.send_event
|
assert manager.events["on_test_event"].func == manager.send_event
|
||||||
|
|
||||||
# Sending an event with valid event_type and data using pytest-asyncio plugin
|
# Sending an event with valid event_type and data using pytest-asyncio plugin
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_sending_event_with_valid_type_and_data_asyncio_plugin(self):
|
async def test_sending_event_with_valid_type_and_data_asyncio_plugin(self):
|
||||||
async def mock_queue_put_nowait(item):
|
async def mock_queue_put_nowait(item):
|
||||||
await queue.put(item)
|
await queue.put(item)
|
||||||
|
|
@ -96,7 +95,6 @@ class TestEventManager:
|
||||||
manager.register_event("invalid_name", "test_type", mock_callback)
|
manager.register_event("invalid_name", "test_type", mock_callback)
|
||||||
|
|
||||||
# Sending an event with complex data and verifying successful event transmission
|
# Sending an event with complex data and verifying successful event transmission
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_sending_event_with_complex_data(self):
|
async def test_sending_event_with_complex_data(self):
|
||||||
queue = asyncio.Queue()
|
queue = asyncio.Queue()
|
||||||
manager = EventManager(queue)
|
manager = EventManager(queue)
|
||||||
|
|
@ -149,7 +147,6 @@ class TestEventManager:
|
||||||
# Verifying the uniqueness of event IDs for each event triggered using await with asyncio decorator
|
# Verifying the uniqueness of event IDs for each event triggered using await with asyncio decorator
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_event_id_uniqueness_with_await(self):
|
async def test_event_id_uniqueness_with_await(self):
|
||||||
queue = asyncio.Queue()
|
queue = asyncio.Queue()
|
||||||
manager = EventManager(queue)
|
manager = EventManager(queue)
|
||||||
|
|
@ -165,7 +162,6 @@ class TestEventManager:
|
||||||
assert event_id_1 != event_id_2
|
assert event_id_1 != event_id_2
|
||||||
|
|
||||||
# Ensuring the queue receives the correct event data format
|
# Ensuring the queue receives the correct event data format
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_queue_receives_correct_event_data_format(self):
|
async def test_queue_receives_correct_event_data_format(self):
|
||||||
async def mock_queue_put_nowait(data):
|
async def mock_queue_put_nowait(data):
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ from langflow.graph import Graph
|
||||||
from langflow.graph.graph.constants import Finish
|
from langflow.graph.graph.constants import Finish
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_graph_not_prepared():
|
async def test_graph_not_prepared():
|
||||||
chat_input = ChatInput()
|
chat_input = ChatInput()
|
||||||
chat_output = ChatOutput()
|
chat_output = ChatOutput()
|
||||||
|
|
@ -21,7 +20,6 @@ async def test_graph_not_prepared():
|
||||||
await graph.astep()
|
await graph.astep()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_graph(caplog: pytest.LogCaptureFixture):
|
async def test_graph(caplog: pytest.LogCaptureFixture):
|
||||||
chat_input = ChatInput()
|
chat_input = ChatInput()
|
||||||
chat_output = ChatOutput()
|
chat_output = ChatOutput()
|
||||||
|
|
@ -34,7 +32,6 @@ async def test_graph(caplog: pytest.LogCaptureFixture):
|
||||||
assert "Graph has vertices but no edges" in caplog.text
|
assert "Graph has vertices but no edges" in caplog.text
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_graph_with_edge():
|
async def test_graph_with_edge():
|
||||||
chat_input = ChatInput()
|
chat_input = ChatInput()
|
||||||
chat_output = ChatOutput()
|
chat_output = ChatOutput()
|
||||||
|
|
@ -55,7 +52,6 @@ async def test_graph_with_edge():
|
||||||
assert graph.edges[0].target_id == output_id
|
assert graph.edges[0].target_id == output_id
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_graph_functional():
|
async def test_graph_functional():
|
||||||
chat_input = ChatInput(_id="chat_input")
|
chat_input = ChatInput(_id="chat_input")
|
||||||
chat_output = ChatOutput(input_value="test", _id="chat_output")
|
chat_output = ChatOutput(input_value="test", _id="chat_output")
|
||||||
|
|
@ -71,7 +67,6 @@ async def test_graph_functional():
|
||||||
assert graph.edges[0].target_id == "chat_output"
|
assert graph.edges[0].target_id == "chat_output"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_graph_functional_async_start():
|
async def test_graph_functional_async_start():
|
||||||
chat_input = ChatInput(_id="chat_input")
|
chat_input = ChatInput(_id="chat_input")
|
||||||
chat_output = ChatOutput(input_value="test", _id="chat_output")
|
chat_output = ChatOutput(input_value="test", _id="chat_output")
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
import pytest
|
|
||||||
from langchain_core.prompts.chat import ChatPromptTemplate
|
from langchain_core.prompts.chat import ChatPromptTemplate
|
||||||
from langflow.schema.message import Message
|
from langflow.schema.message import Message
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_message_async_prompt_serialization():
|
async def test_message_async_prompt_serialization():
|
||||||
template = "Hello, {name}!"
|
template = "Hello, {name}!"
|
||||||
message = await Message.from_template_and_variables(template, name="Langflow")
|
message = await Message.from_template_and_variables(template, name="Langflow")
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ def api_request():
|
||||||
return data.APIRequestComponent()
|
return data.APIRequestComponent()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
@respx.mock
|
@respx.mock
|
||||||
async def test_successful_get_request(api_request):
|
async def test_successful_get_request(api_request):
|
||||||
# Mocking a successful GET request
|
# Mocking a successful GET request
|
||||||
|
|
@ -53,7 +52,6 @@ def test_parse_curl(api_request):
|
||||||
assert new_build_config["body"]["value"] == {"key": "value"}
|
assert new_build_config["body"]["value"] == {"key": "value"}
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
@respx.mock
|
@respx.mock
|
||||||
async def test_failed_request(api_request):
|
async def test_failed_request(api_request):
|
||||||
# Mocking a failed GET request
|
# Mocking a failed GET request
|
||||||
|
|
@ -68,7 +66,6 @@ async def test_failed_request(api_request):
|
||||||
assert result.data["status_code"] == 404
|
assert result.data["status_code"] == 404
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
@respx.mock
|
@respx.mock
|
||||||
async def test_timeout(api_request):
|
async def test_timeout(api_request):
|
||||||
# Mocking a timeout
|
# Mocking a timeout
|
||||||
|
|
@ -84,7 +81,6 @@ async def test_timeout(api_request):
|
||||||
assert result.data["error"] == "Request timed out"
|
assert result.data["error"] == "Request timed out"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
@respx.mock
|
@respx.mock
|
||||||
async def test_build_with_multiple_urls(api_request):
|
async def test_build_with_multiple_urls(api_request):
|
||||||
# This test depends on having a working internet connection and accessible URLs
|
# This test depends on having a working internet connection and accessible URLs
|
||||||
|
|
|
||||||
|
|
@ -276,7 +276,6 @@ async def test_delete_flows(client: AsyncClient, logged_in_headers):
|
||||||
assert response.json().get("deleted") == number_of_flows
|
assert response.json().get("deleted") == number_of_flows
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
@pytest.mark.usefixtures("active_user")
|
@pytest.mark.usefixtures("active_user")
|
||||||
async def test_delete_flows_with_transaction_and_build(client: AsyncClient, logged_in_headers):
|
async def test_delete_flows_with_transaction_and_build(client: AsyncClient, logged_in_headers):
|
||||||
# Create ten flows
|
# Create ten flows
|
||||||
|
|
@ -335,7 +334,6 @@ async def test_delete_flows_with_transaction_and_build(client: AsyncClient, logg
|
||||||
assert response.json() == {"vertex_builds": {}}
|
assert response.json() == {"vertex_builds": {}}
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
@pytest.mark.usefixtures("active_user")
|
@pytest.mark.usefixtures("active_user")
|
||||||
async def test_delete_folder_with_flows_with_transaction_and_build(client: AsyncClient, logged_in_headers):
|
async def test_delete_folder_with_flows_with_transaction_and_build(client: AsyncClient, logged_in_headers):
|
||||||
# Create a new folder
|
# Create a new folder
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ def test_get_project_data():
|
||||||
assert isinstance(project_icon_bg_color, str) or project_icon_bg_color is None
|
assert isinstance(project_icon_bg_color, str) or project_icon_bg_color is None
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
@pytest.mark.usefixtures("client")
|
@pytest.mark.usefixtures("client")
|
||||||
async def test_create_or_update_starter_projects():
|
async def test_create_or_update_starter_projects():
|
||||||
with session_scope() as session:
|
with session_scope() as session:
|
||||||
|
|
@ -65,7 +64,6 @@ async def test_create_or_update_starter_projects():
|
||||||
|
|
||||||
|
|
||||||
# Some starter projects require integration
|
# Some starter projects require integration
|
||||||
# @pytest.mark.asyncio
|
|
||||||
# async def test_starter_projects_can_run_successfully(client):
|
# async def test_starter_projects_can_run_successfully(client):
|
||||||
# with session_scope() as session:
|
# with session_scope() as session:
|
||||||
# # Run the function to create or update projects
|
# # Run the function to create or update projects
|
||||||
|
|
@ -128,7 +126,6 @@ def add_edge(source, target, from_output, to_input):
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_refresh_starter_projects():
|
async def test_refresh_starter_projects():
|
||||||
data_path = str(Path(__file__).parent.parent.parent.absolute() / "base" / "langflow" / "components")
|
data_path = str(Path(__file__).parent.parent.parent.absolute() / "base" / "langflow" / "components")
|
||||||
components = build_custom_component_list_from_path(data_path)
|
components = build_custom_component_list_from_path(data_path)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import pytest
|
|
||||||
from langflow.processing.process import process_tweaks
|
from langflow.processing.process import process_tweaks
|
||||||
from langflow.services.deps import get_session_service
|
from langflow.services.deps import get_session_service
|
||||||
|
|
||||||
|
|
@ -262,7 +261,6 @@ def test_tweak_not_in_template():
|
||||||
assert result == graph_data
|
assert result == graph_data
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_load_langchain_object_with_cached_session(basic_graph_data):
|
async def test_load_langchain_object_with_cached_session(basic_graph_data):
|
||||||
# Provide a non-existent session_id
|
# Provide a non-existent session_id
|
||||||
session_service = get_session_service()
|
session_service = get_session_service()
|
||||||
|
|
@ -276,7 +274,6 @@ async def test_load_langchain_object_with_cached_session(basic_graph_data):
|
||||||
|
|
||||||
|
|
||||||
# TODO: Update basic graph data
|
# TODO: Update basic graph data
|
||||||
# @pytest.mark.asyncio
|
|
||||||
# async def test_load_langchain_object_with_no_cached_session(client, basic_graph_data):
|
# async def test_load_langchain_object_with_no_cached_session(client, basic_graph_data):
|
||||||
# # Provide a non-existent session_id
|
# # Provide a non-existent session_id
|
||||||
# session_service = get_session_service()
|
# session_service = get_session_service()
|
||||||
|
|
@ -296,7 +293,6 @@ async def test_load_langchain_object_with_cached_session(basic_graph_data):
|
||||||
# assert id(graph1) != id(graph2)
|
# assert id(graph1) != id(graph2)
|
||||||
|
|
||||||
|
|
||||||
# @pytest.mark.asyncio
|
|
||||||
# async def test_load_langchain_object_without_session_id(client, basic_graph_data):
|
# async def test_load_langchain_object_without_session_id(client, basic_graph_data):
|
||||||
# # Provide a non-existent session_id
|
# # Provide a non-existent session_id
|
||||||
# session_service = get_session_service()
|
# session_service = get_session_service()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue