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

Function get_simple_api_test

src/backend/tests/conftest.py:818–827  ·  view source on GitHub ↗
(client, logged_in_headers, json_simple_api_test)

Source from the content-addressed store, hash-verified

816
817@pytest.fixture(name="simple_api_test")
818async def get_simple_api_test(client, logged_in_headers, json_simple_api_test):
819 # Once the client is created, we can get the starter project
820 # Just create a new flow with the simple api test
821 flow = orjson.loads(json_simple_api_test)
822 data = flow["data"]
823 flow = FlowCreate(name="Simple API Test", data=data, description="Simple API Test")
824 response = await client.post("api/v1/flows/", json=flow.model_dump(), headers=logged_in_headers)
825 assert response.status_code == 201
826 yield response.json()
827 await client.delete(f"api/v1/flows/{response.json()['id']}", headers=logged_in_headers)
828
829
830@pytest.fixture(name="starter_project")

Callers

nothing calls this directly

Calls 5

FlowCreateClass · 0.90
postMethod · 0.45
model_dumpMethod · 0.45
jsonMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected