tests: optimize test durations and refactor test fixtures (#3713)

* Refactor test fixtures and imports for optimization

- Reordered and optimized imports in `conftest.py`.
- Changed return statements to yield in `basic_graph` and `create_webhook` fixtures for better resource management.
- Added cleanup step to `create_webhook` fixture to delete created webhook after test completion.

* Refactor imports and add placeholder client fixture in test_ChatOllama_component.py

* Add pytest fixture 'client' to test_graph.py

* Add pytest fixture 'client' to test_callback_graph.py for test optimization

* Add 'unit_tests_looponfail' target to Makefile for running unit tests with loop-on-fail option

* Optimize test durations and update test cases in various modules
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-09-06 18:03:27 -03:00 • committed by GitHub
commit fcf780bf42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 516 additions and 304 deletions

View file

@ -25,6 +25,11 @@ from langflow.utils.payload import get_root_vertex
# BASIC_EXAMPLE_PATH, COMPLEX_EXAMPLE_PATH, OPENAPI_EXAMPLE_PATH
@pytest.fixture
def client():
pass
@pytest.fixture
def sample_template():
return {