From f658d62c51532b6e8ce5dd8bb0dd6cc5a139accb Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 16 Jun 2023 19:12:45 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20chore(test=5Fdatabase.py):=20rem?= =?UTF-8?q?ove=20unused=20test=5Fstress=5Fcreate=5Fflow=20function=20The?= =?UTF-8?q?=20test=5Fstress=5Fcreate=5Fflow=20function=20is=20not=20used?= =?UTF-8?q?=20in=20the=20codebase=20and=20is=20therefore=20removed=20to=20?= =?UTF-8?q?improve=20code=20readability=20and=20maintainability.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_database.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/tests/test_database.py b/tests/test_database.py index cf824851b..bc512b6b0 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -1,6 +1,5 @@ import json import pytest -import threading from uuid import UUID, uuid4 from sqlalchemy.orm import Session @@ -278,25 +277,6 @@ def test_read_empty_flows(client: TestClient): assert len(response.json()) == 0 -def test_stress_create_flow(client: TestClient, json_flow: str): - flow_data = json.loads(json_flow) - data = flow_data["data"] - flow = FlowCreate(name="Test Flow", description="description", data=data) - - def create_flow(): - response = client.post("api/v1/flows/", json=flow.dict()) - assert response.status_code == 200 - - threads = [] - for _ in range(100): - t = threading.Thread(target=create_flow) - threads.append(t) - t.start() - - for t in threads: - t.join() - - def test_create_flow_style(client: TestClient): flow_style = FlowStyleCreate(color="red", emoji="🔴") response = client.post("api/v1/flow_styles/", json=flow_style.dict())