🔧 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
This commit is contained in:
parent
1c0f18f897
commit
479a808634
9 changed files with 171 additions and 134 deletions
|
|
@ -1,5 +1,5 @@
|
|||
from langflow.services.database.utils import session_getter
|
||||
from langflow.services.getters import get_db_manager
|
||||
from langflow.services.getters import get_db_service
|
||||
import pytest
|
||||
from langflow.services.database.models.user import User
|
||||
from langflow.services.auth.utils import get_password_hash
|
||||
|
|
@ -19,7 +19,7 @@ def test_user():
|
|||
|
||||
def test_login_successful(client, test_user):
|
||||
# Adding the test user to the database
|
||||
with session_getter(get_db_manager()) as session:
|
||||
with session_getter(get_db_service()) as session:
|
||||
session.add(test_user)
|
||||
session.commit()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue