Skip to content

Commit

Permalink
feat: Fix assertion in test_create_flows to check for substring in na…
Browse files Browse the repository at this point in the history
…me field

The assertion in the test_create_flows function was modified to check if the name field contains the substring "Flow 1" instead of an exact match. This change allows for more flexibility in the test and ensures that the test passes even if there are additional characters in the name field.
  • Loading branch information
ogabrielluiz committed Aug 8, 2024
1 parent 6955e75 commit 9870253
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/tests/unit/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def test_create_flows(client: TestClient, session: Session, json_flow: str, logg
# Check response data
response_data = response.json()
assert len(response_data) == 2
assert response_data[0]["name"] == "Flow 1"
assert "Flow 1" in response_data[0]["name"]
assert response_data[0]["description"] == "description"
assert response_data[0]["data"] == data
assert response_data[1]["name"] == "Flow 2"
Expand Down Expand Up @@ -241,7 +241,7 @@ def test_upload_file(client: TestClient, session: Session, json_flow: str, logge
# Check response data
response_data = response.json()
assert len(response_data) == 2
assert response_data[0]["name"] == "Flow 1"
assert "Flow 1" in response_data[0]["name"]
assert response_data[0]["description"] == "description"
assert response_data[0]["data"] == data
assert response_data[1]["name"] == "Flow 2"
Expand Down

0 comments on commit 9870253

Please sign in to comment.