🔧 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
|
|
@ -37,7 +37,7 @@ def super_user_headers(client, super_user):
|
|||
|
||||
@pytest.fixture
|
||||
def deactivated_user():
|
||||
with session_getter(get_db_manager()) as session:
|
||||
with session_getter(get_db_service()) as session:
|
||||
user = User(
|
||||
username="deactivateduser",
|
||||
password=get_password_hash("testpassword"),
|
||||
|
|
@ -55,7 +55,7 @@ def test_user_waiting_for_approval(
|
|||
client,
|
||||
):
|
||||
# Create a user that is not active and has never logged in
|
||||
with session_getter(get_db_manager()) as session:
|
||||
with session_getter(get_db_service()) as session:
|
||||
user = User(
|
||||
username="waitingforapproval",
|
||||
password=get_password_hash("testpassword"),
|
||||
|
|
@ -115,7 +115,7 @@ def test_data_consistency_after_delete(client, test_user, super_user_headers):
|
|||
|
||||
def test_inactive_user(client):
|
||||
# Create a user that is not active and has a last_login_at value
|
||||
with session_getter(get_db_manager()) as session:
|
||||
with session_getter(get_db_service()) as session:
|
||||
user = User(
|
||||
username="inactiveuser",
|
||||
password=get_password_hash("testpassword"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue