langflow/tests
Gabriel Luiz Freitas Almeida e5986ec727
Added curl parse to API Request component and fixed dict issues (#2013)
* Refactor code to remove console.log statements

* Refactor code to remove console.log statements

* ⬆️ (pyproject.toml): upgrade uncurl dependency to version 0.0.11

* 📝 (flows.py): Add docstring to the read_flows function to provide information about its purpose, arguments, and return value
📝 (parse.py): Add comments and docstrings to the parse_context function to explain its purpose and how it works
📝 (APIRequest.py): Add a new method update_build_config to handle parsing of curl commands and update build configuration based on the parsed context

* refactor: Improve value change detection logic in DictComponent

* refactor: Improve value change detection logic in DictAreaModal

* refactor: Update APIRequest to handle parsing of curl commands and update build configuration

This commit updates the APIRequest class in APIRequest.py to handle parsing of curl commands and update the build configuration based on the parsed context. It introduces a new method, update_build_config, which parses the curl command using the parse_context function and updates the build configuration with the parsed information. Additionally, it handles JSON decoding errors when parsing the data field of the curl command. This improvement enhances the functionality and flexibility of the APIRequest component.

* feat: Add support for handling headers as dictionaries in APIRequest

* refactor: Parse curl commands and update build configuration in APIRequest

This commit refactors the APIRequest class in APIRequest.py to handle parsing of curl commands and update the build configuration based on the parsed context. It introduces a new method, update_build_config, which parses the curl command using the parse_context function and updates the build configuration with the parsed information. Additionally, it handles JSON decoding errors when parsing the data field of the curl command. This improvement enhances the functionality and flexibility of the APIRequest component.

*  (test_data_components.py): add new test case to parse curl command into build configuration for API requests

* 🐛 (src/backend/base/langflow/components/data/APIRequest.py): fix type hinting issue for bodies variable in APIRequest class
2024-05-30 06:50:31 -07:00
..
data 1.0 Alpha (#1599) 2024-04-04 02:46:44 -03:00
locust Reapply "Refactor state management to use Zustand, migrate components to CustomComponent and other fixes" 2024-02-05 19:02:34 -03:00
__init__.py feat(tests): add __init__.py and utils.py files to tests directory for test setup and utility functions 2023-09-05 12:24:43 -03:00
conftest.py Fix lint and tests (#1959) 2024-05-23 07:55:06 -07:00
test_api_key.py Update datetime handling in ApiKey and Variable models (#1673) 2024-04-10 23:04:10 -03:00
test_cache.py 1.0 Alpha (#1599) 2024-04-04 02:46:44 -03:00
test_cli.py Update settings attributes and remove config.yaml references (#1975) 2024-05-26 07:24:21 -07:00
test_custom_component.py chore: remove unused files and update imports (#1967) 2024-05-24 13:13:38 -07:00
test_data_components.py Added curl parse to API Request component and fixed dict issues (#2013) 2024-05-30 06:50:31 -07:00
test_database.py 1.0 Alpha (#1599) 2024-04-04 02:46:44 -03:00
test_endpoints.py Update settings attributes and remove config.yaml references (#1975) 2024-05-26 07:24:21 -07:00
test_files.py 1.0 Alpha (#1599) 2024-04-04 02:46:44 -03:00
test_frontend_nodes.py Refactor imports and update function names 2024-01-25 16:17:40 -03:00
test_graph.py Format code and update langflow version (#1922) 2024-05-19 19:17:18 -07:00
test_helper_components.py chore: remove unused files and update imports (#1967) 2024-05-24 13:13:38 -07:00
test_initial_setup.py Fix lint and tests (#1959) 2024-05-23 07:55:06 -07:00
test_loading.py chore: remove unused files and update imports (#1967) 2024-05-24 13:13:38 -07:00
test_login.py Update datetime handling in ApiKey and Variable models (#1673) 2024-04-10 23:04:10 -03:00
test_process.py Fix various issues and refactor code (#1671) 2024-04-10 22:40:21 -03:00
test_record.py 1.0 Alpha (#1599) 2024-04-04 02:46:44 -03:00
test_setup_superuser.py 1.0 Alpha (#1599) 2024-04-04 02:46:44 -03:00
test_template.py Changes default location for the database and adds the option to use the previous behavior (#1907) 2024-05-15 20:41:01 -03:00
test_user.py 1.0 Alpha (#1599) 2024-04-04 02:46:44 -03:00
test_validate_code.py formatting 2023-03-31 14:06:40 -03:00
text_experimental_components.py 1.0 Alpha (#1599) 2024-04-04 02:46:44 -03:00
utils.py 🐛 fix(basic_example.json): change value of "value" key from "abc" to null to remove hardcoded value and improve flexibility 2023-09-22 11:06:25 -03:00