Fix mark_branch function and refactor build_and_cache_graph_from_db function (#1833)
* Fix mark_branch function in Graph class to properly handle visited vertices * Refactor build_and_cache_graph_from_db function in utils.py to simplify code and remove unnecessary parameter * Fix retrieval of graph from cache in retrieve_vertices_order function * Fix possible_id type annotation in get_id_from_search_string function * Refactor APIRequest class to improve variable naming and remove unnecessary underscore prefix in headers parameter * Refactor buildVertices function in buildUtils.ts to improve code readability and remove unnecessary variable assignment * Fix API endpoints in test_endpoints.py to use correct HTTP methods
This commit is contained in:
parent
2dc4ffd99f
commit
92d39a6500
7 changed files with 31 additions and 38 deletions
|
|
@ -393,13 +393,13 @@ def test_various_prompts(client, prompt, expected_input_variables):
|
|||
|
||||
|
||||
def test_get_vertices_flow_not_found(client, logged_in_headers):
|
||||
response = client.get("/api/v1/build/nonexistent_id/vertices", headers=logged_in_headers)
|
||||
response = client.post("/api/v1/build/nonexistent_id/vertices", headers=logged_in_headers)
|
||||
assert response.status_code == 500 # Or whatever status code you've set for invalid ID
|
||||
|
||||
|
||||
def test_get_vertices(client, added_flow_with_prompt_and_history, logged_in_headers):
|
||||
flow_id = added_flow_with_prompt_and_history["id"]
|
||||
response = client.get(f"/api/v1/build/{flow_id}/vertices", headers=logged_in_headers)
|
||||
response = client.post(f"/api/v1/build/{flow_id}/vertices", headers=logged_in_headers)
|
||||
assert response.status_code == 200
|
||||
assert "ids" in response.json()
|
||||
# The response should contain the list in this order
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue