Commit graph

4 commits

Author SHA1 Message Date
Nicolò Boschi
96872f3aa5
chore: refactor and add components integration tests (#3607)
* improve inegration tests

* add fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-02 15:21:47 +02:00
Gabriel Luiz Freitas Almeida
48fb846a4d
refactor: change typing annotations in tests folder (#3594)
* refactor(log_router.py): change variable type annotation from List to list for better consistency
refactor(utils.py): change variable type annotation from Dict to dict for better consistency
refactor(base.py): change variable type annotation from Optional to Union for better clarity
refactor(callback.py): change variable type annotation from Dict to dict for better consistency
refactor(chat.py): change variable type annotation from Optional to Union for better clarity
refactor(endpoints.py): change variable type annotation from Optional to Union for better clarity
refactor(flows.py): change variable type annotation from List to list for better consistency

refactor(api): update response_model annotations to use lowercase list for consistency and improve readability

refactor(store.py): update type annotations for query parameters in get_components endpoint to improve code readability and maintainability
feat(store.py): add support for type hinting Union and list types in query parameters for better data validation and documentation

* run make format

* refactor(input_mixin.py): update typing annotations for variables to use union types for better clarity and compatibility with Python 3.10
refactor(inputs.py): update typing annotations for variables to use union types and import necessary modules for compatibility with Python 3.10

* refactor(base.py): remove unnecessary imports and update typing for fields in Input and Output classes
feat(base.py): add support for specifying field types more explicitly in Input and Output classes
feat(frontend_node/base.py): enhance typing and field definitions in FrontendNode class
feat(frontend_node/custom_components.py): improve typing and field definitions in CustomComponentFrontendNode and ComponentFrontendNode classes
feat(template/base.py): update typing for fields in Template class and remove unnecessary imports

* refactor(inputs): remove unnecessary Optional import from typing in input_mixin.py and inputs.py files to improve code readability and maintainability

* refactor(schema.py): change 'Type' to 'type' for consistency in type annotations
refactor(schema.py): change 'list' to 'List' and 'Literal' to 'literal' for correct type hinting in create_input_schema function

* refactor(utils.py): change typing annotations from List and Union to list and type to follow PEP 585 standards
refactor(test_schema.py): change typing annotations from List and List to list and list to follow PEP 585 standards
refactor(test_graph.py): change typing annotations from Type and Union to type and Vertex | None to follow PEP 585 standards
refactor(test_io_schema.py): change typing annotations from List and List to list and list to follow PEP 585 standards
refactor(test_custom_component.py): update file reading method to remove unnecessary "r" mode
refactor(test_helper_components.py): update file reading method to remove unnecessary "r" mode
refactor(test_kubernetes_secrets.py): update b64encode method argument to bytes type
refactor(test_template.py): change typing annotations from Optional, List, and Dict to list, dict, and None to follow PEP 585 standards

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-28 19:45:19 +00:00
Jordan Frazier
75520729de
build: fix astra integration tests (#3518) 2024-08-26 16:44:27 +00:00
Gabriel Luiz Freitas Almeida
0122a50a35
refactor: move tests folder structure and update pytest commands (#2785)
* refactor: move tests folder to src/backend

* chore(Makefile): update pytest commands to run tests from the correct directory paths for unit and integration tests

* refactor: update file path in test_custom_component.py

The file path in the test_custom_component.py file has been updated to use the correct relative path to the component_multiple_outputs.py file. This change ensures that the test code can access the correct file and improves the reliability of the test.
2024-07-18 15:19:43 +00:00
Renamed from tests/integration/utils.py (Browse further)