MCPcopy
hub / github.com/langflow-ai/langflow / flow_component

Function flow_component

src/backend/tests/conftest.py:708–716  ·  view source on GitHub ↗
(client: AsyncClient, logged_in_headers)

Source from the content-addressed store, hash-verified

706
707@pytest.fixture
708async def flow_component(client: AsyncClient, logged_in_headers):
709 chat_input = ChatInput()
710 graph = Graph(start=chat_input, end=chat_input)
711 graph_dict = graph.dump(name="Chat Input Component")
712 flow = FlowCreate(**graph_dict)
713 response = await client.post("api/v1/flows/", json=flow.model_dump(), headers=logged_in_headers)
714 assert response.status_code == 201
715 yield response.json()
716 await client.delete(f"api/v1/flows/{response.json()['id']}", headers=logged_in_headers)
717
718
719@pytest.fixture

Callers

nothing calls this directly

Calls 8

dumpMethod · 0.95
ChatInputClass · 0.90
GraphClass · 0.90
FlowCreateClass · 0.90
postMethod · 0.45
model_dumpMethod · 0.45
jsonMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected