From 4e1fc2202ab97a6113117cb123012a223984e609 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 7 Aug 2023 14:16:37 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20refactor(test=5Fcli.py):=20remov?= =?UTF-8?q?e=20unused=20imports=20and=20test=20cases?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test_cli.py file had some unused imports and test cases that were not being used. This commit removes those unused imports and test cases to improve code cleanliness and maintainability. --- tests/test_cli.py | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index cd2dcdbb7..408500d7a 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -3,9 +3,6 @@ from tempfile import tempdir from langflow.__main__ import app import pytest -import requests -import multiprocessing -import time from langflow.services import utils @@ -17,28 +14,6 @@ def default_settings(): ] -def test_server(default_settings): - p = multiprocessing.Process( - target=app, - args=(["--host", "localhost", "--port", "8982", *default_settings],), - ) - p.start() - time.sleep(5) # allow some time for the server to start - - response = requests.get( - "http://localhost:8982/health" - ) # assuming a /health endpoint exists - assert response.status_code == 200 - - p.terminate() - - -def test_database_url(runner): - result = runner.invoke(app, ["--database-url", "sqlite:///test.db"]) - assert result.exit_code == 2, result.stdout - assert "No such option: --database-url" in result.output - - def test_components_path(runner, client, default_settings): # Create a foldr in the tmp directory temp_dir = Path(tempdir)