Commit graph

25 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
b19b317e6b Refactor user tests and fix error handling 2024-01-25 16:16:15 -03:00
Gabriel Luiz Freitas Almeida
a6a69a0f3a Fix import statements and formatting issues 2024-01-25 13:03:42 -03:00
Gabriel Luiz Freitas Almeida
bf76ba660f Fix last_login_at default value 2023-12-04 15:44:30 -03:00
Gabriel Luiz Freitas Almeida
9d6cafd8a2 Update database model imports 2023-11-24 11:19:22 -03:00
Gabriel Luiz Freitas Almeida
020488e97b Fix typos and update method names 2023-11-21 14:49:47 -03:00
Gabriel Luiz Freitas Almeida
60f6d08fc3 Merge remote-tracking branch 'origin/dev' into feature/store 2023-11-14 21:41:58 -03:00
Gabriel Luiz Freitas Almeida
e4d8687a09 ruff format 2023-11-13 18:32:34 -03:00
Gabriel Luiz Freitas Almeida
c90fe4cc8f 🐛 fix(test_user.py): fix linting issue by adding noqa comment to long lines 2023-11-02 22:35:24 -03:00
Gabriel Luiz Freitas Almeida
780b0d68d8 🔧 fix(test_database.py): add description field to FlowCreate object to fix test failure caused by missing required field
🐛 fix(test_user.py): update error message and details for invalid UUID input in test_patch_user_wrong_id and test_delete_user_wrong_id to provide more specific information
2023-11-02 22:19:58 -03:00
Gabriel Luiz Freitas Almeida
c50d1344ca rename getters to deps 2023-10-18 09:18:16 -03:00
Gabriel Luiz Freitas Almeida
bfdb9de879 🐛 fix(test_user.py): fix incorrect assertion in test_patch_user function 2023-09-26 10:21:39 -03:00
Gabriel Luiz Freitas Almeida
479a808634 🔧 fix(endpoints.py): remove unused import and function call to improve code cleanliness and maintainability
🔧 fix(endpoints.py): move import statement to the top of the file for better organization and readability
🔧 fix(getters.py): change service type from DATABASE_MANAGER to DATABASE_SERVICE for consistency and clarity
🔧 fix(getters.py): change service type from CACHE_MANAGER to CACHE_SERVICE for consistency and clarity
🔧 fix(getters.py): change service type from SESSION_MANAGER to SESSION_SERVICE for consistency and clarity
🔧 fix(getters.py): change service type from TASK_MANAGER to TASK_SERVICE for consistency and clarity
🔧 fix(getters.py): remove unused function get_chat_service() to improve code cleanliness and maintainability
🔧 fix(getters.py): remove duplicate function get_settings_service() to improve code cleanliness and maintainability
🔧 fix(getters.py): remove duplicate function get_db_service() to improve code cleanliness and maintainability
🔧 fix(getters.py): remove duplicate function get_session() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused import statement to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function setup_superuser() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function teardown_superuser() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function teardown_services() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function initialize_settings_manager() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function initialize_session_manager() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function initialize_services() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused import statement to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function get_session_override() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function distributed_client_fixture() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function client_fixture() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function test_user() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function active_user

🐛 fix(test_endpoints.py): update import statements to use get_db_service instead of get_db_manager to improve code semantics
🐛 fix(test_login.py): update import statements to use get_db_service instead of get_db_manager to improve code semantics
🐛 fix(test_setup_superuser.py): update import statements to use get_db_service instead of get_db_manager to improve code semantics
🐛 fix(test_user.py): update import statements to use get_db_service instead of get_db_manager to improve code semantics
2023-09-22 18:07:55 -03:00
Gabriel Luiz Freitas Almeida
b3febf25dd Merge remote-tracking branch 'origin/dev' into celery 2023-09-22 14:50:19 -03:00
Gabriel Luiz Freitas Almeida
78ecb4c341 Merge remote-tracking branch 'origin/dev' into celery 2023-09-22 12:53:05 -03:00
Gabriel Luiz Freitas Almeida
416d294117 🐛 fix(basic_example.json): change value of "value" key from "abc" to null to remove hardcoded value and improve flexibility
 test(test_user.py): add test to create a super user for testing purposes and ensure it returns the correct response
🔥 chore(utils.py): remove unused functions run_post and poll_task_status to clean up code
2023-09-22 11:06:25 -03:00
Gabriel Luiz Freitas Almeida
b4f48f1ad9 🔧 fix(test_user.py): update imports to match changes in project structure
🔧 fix(test_user.py): update fixtures to use session_getter and get_db_manager functions for session management
 feat(test_user.py): add support for creating and managing database sessions using session_getter and get_db_manager functions
🔧 fix(test_user.py): update test_user_waiting_for_approval function to use session_getter and get_db_manager functions for session management
🔧 fix(test_user.py): update test_data_consistency_after_delete function to use session_getter and get_db_manager functions for session management
🔧 fix(test_user.py): update test_inactive_user function to use session_getter and get_db_manager functions for session management
2023-09-20 18:35:38 -03:00
Gabriel Luiz Freitas Almeida
0c3d59a804 🐛 fix(__main__.py): import correct function for get_db_manager and get_settings_manager in langflow/__main__.py
🐛 fix(api_key.py): import correct function for get_session in langflow/api/v1/api_key.py
🐛 fix(chat.py): import correct function for get_chat_manager and get_session in langflow/api/v1/chat.py
🐛 fix(components.py): import correct function for get_session in langflow/api/v1/components.py
🐛 fix(endpoints.py): import correct function for get_session and get_settings_manager in langflow/api/v1/endpoints.py
🐛 fix(flows.py): import correct function for get_session and get_settings_manager in langflow/api/v1/flows.py
🐛 fix(login.py): import correct function for get_session and get_settings_manager in langflow/api/v1/login.py
🐛 fix(users.py): import correct function for get_session in langflow/api/v1/users.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/agents/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/chains/base.py
🐛 fix(custom_component.py): import correct function for get_db_manager in langflow/interface/custom/custom_component.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/document_loaders/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/embeddings/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/llms/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/memories/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/output_parsers/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/prompts/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/retrievers/base.py

🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect

🔧 fix(test_user.py): update import statement for get_settings_manager to reflect new module structure
🔧 fix(test_user.py): update variable names for superuser and superuser password to match new naming convention
🔧 fix(test_user.py): update variable names for superuser and superuser password to match new naming convention
🔧 fix(test_vectorstore_template.py): update import statement for get_settings_manager to reflect new module structure
2023-09-18 15:42:39 -03:00
Gabriel Luiz Freitas Almeida
651595932c Change all Services names from Manager to Service 2023-09-15 17:41:39 -03:00
Gabriel Luiz Freitas Almeida
01a289dd9a 🐛 fix(users.py): assign the hashed new password to a variable before updating the user's password to ensure consistency
 test(test_user.py): add test to verify if the new password works after resetting it
2023-09-08 14:28:32 -03:00
Gabriel Luiz Freitas Almeida
f95a38a4b5 🐛 fix(crud.py): change HTTP status code from 304 to status.HTTP_304_NOT_MODIFIED for better readability and consistency
 feat(crud.py): add support for updating user profile image in the update_user function
 feat(test_user.py): add test case for updating user profile image in the test_patch_user function
2023-09-08 14:23:19 -03:00
Gabriel Luiz Freitas Almeida
49167a58a9 🐛 fix(tests): update endpoint path from "/api/v1/user" to "/api/v1/users" for consistency and clarity
 feat(tests): add assertion for response status code 201 after creating a user
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
🐛 fix(tests): update endpoint path from "/api/v1/user" to "/api/v1/users/whoami" to fetch the updated user
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response status code 401 and detail message after fetching the updated user
 feat(tests): add assertion for response status code 200 after deleting a user
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response status code 200 and detail message after deleting a user
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response status code 304 after patching user data
 feat(tests): add assertion for response status code 200 after resetting user password
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response status code 422 and detail message after patching user data with wrong id
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response
2023-09-05 17:19:46 -03:00
Gabriel Luiz Freitas Almeida
269cb9bc53 🐛 fix(__main__.py): pass the session as a keyword argument 'db' to the create_super_user function for clarity and consistency
🐛 fix(test_user.py): pass the session as a keyword argument 'db' to the create_super_user function for clarity and consistency
2023-08-31 11:16:39 -03:00
Gabriel Luiz Freitas Almeida
d8c7450576 🔧 chore(test_user.py): refactor super_user fixture to use auth settings from settings manager for username and password
🔧 chore(test_user.py): refactor super_user fixture to use auth settings from settings manager for username and password in create_super_user function call
2023-08-31 10:55:04 -03:00
Gabriel Luiz Freitas Almeida
950b9d179b 🔥 refactor(user/utils.py): remove unused code and imports from user/utils.py module
 feat(test_api_key.py): add tests for API key creation, retrieval, and deletion
 feat(test_user.py): remove unused fixtures and imports from test_user.py module
2023-08-25 12:05:54 -03:00
Gabriel Luiz Freitas Almeida
8411922a07 feat(test_user.py): add tests for user-related functionalities
🐛 fix(test_user.py): fix typo in test_user_waiting_for_approval function name
🐛 fix(test_user.py): fix typo in test_deactivated_user_cannot_access function name
🐛 fix(test_user.py): fix typo in test_data_consistency_after_update function name
🐛 fix(test_user.py): fix typo in test_data_consistency_after_delete function name
🐛 fix(test_user.py): fix typo in test_inactive_user function name
🐛 fix(test_user.py): fix typo in test_normal_user_cant_read_all_users function name
🐛 fix(test_user.py): fix typo in test_patch_user_wrong_id function name
🐛 fix(test_user.py): fix typo in test_delete_user_wrong_id function name
🐛 fix(test_user.py): fix typo in test_normal_user_cant_delete_user function name
 feat(test_user.py): add test_add_super_user_for_testing_purposes_delete_me_before_merge_into_dev function
2023-08-25 10:17:46 -03:00