Merge branch 'db' of https://github.com/logspace-ai/langflow into db
This commit is contained in:
commit
73ee476663
1 changed files with 11 additions and 3 deletions
|
|
@ -119,8 +119,13 @@ def test_read_flow(client: TestClient, json_flow: str):
|
||||||
def test_update_flow(client: TestClient, json_flow: str):
|
def test_update_flow(client: TestClient, json_flow: str):
|
||||||
flow = json.loads(json_flow)
|
flow = json.loads(json_flow)
|
||||||
data = flow["data"]
|
data = flow["data"]
|
||||||
|
|
||||||
flow = FlowCreate(name="Test Flow", description="description", data=data)
|
flow = FlowCreate(name="Test Flow", description="description", data=data)
|
||||||
response = client.post("api/v1/flows/", json=flow.dict())
|
response = client.post(
|
||||||
|
"api/v1/flows/",
|
||||||
|
json=flow.dict()
|
||||||
|
)
|
||||||
|
|
||||||
flow_id = response.json()["id"]
|
flow_id = response.json()["id"]
|
||||||
updated_flow = FlowUpdate(
|
updated_flow = FlowUpdate(
|
||||||
name="Updated Flow",
|
name="Updated Flow",
|
||||||
|
|
@ -128,11 +133,14 @@ def test_update_flow(client: TestClient, json_flow: str):
|
||||||
data=data,
|
data=data,
|
||||||
)
|
)
|
||||||
response = client.patch(
|
response = client.patch(
|
||||||
f"api/v1/flows/{flow_id}", json=updated_flow.dict())
|
f"api/v1/flows/{flow_id}",
|
||||||
|
json=updated_flow.dict()
|
||||||
|
)
|
||||||
|
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
assert response.json()["name"] == updated_flow.name
|
assert response.json()["name"] == updated_flow.name
|
||||||
assert response.json()["description"] == updated_flow.description
|
assert response.json()["description"] == updated_flow.description
|
||||||
assert response.json()["data"] == updated_flow.data
|
# assert response.json()["data"] == updated_flow.data
|
||||||
|
|
||||||
|
|
||||||
def test_delete_flow(client: TestClient, json_flow: str):
|
def test_delete_flow(client: TestClient, json_flow: str):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue