Refactor(backend): improve formatting in services, repositories & tests
- Consistently format multi-line function headers, exception handling, and repository method calls for readability. - Reorganize misplaced imports across modules (e.g., services & tests) into proper sorted order. - Adjust indentation, line breaks, and spacing inconsistencies in tests and migration files. - Cleanup unnecessary trailing newlines and reorganize `__all__` declarations for consistency.
This commit is contained in:
@@ -120,7 +120,9 @@ class TestBaseCRUDUpdateFailures:
|
||||
with patch.object(
|
||||
session, "rollback", new_callable=AsyncMock
|
||||
) as mock_rollback:
|
||||
with pytest.raises(IntegrityConstraintError, match="Database operation failed"):
|
||||
with pytest.raises(
|
||||
IntegrityConstraintError, match="Database operation failed"
|
||||
):
|
||||
await user_crud.update(
|
||||
session, db_obj=user, obj_in={"first_name": "Updated"}
|
||||
)
|
||||
@@ -142,7 +144,9 @@ class TestBaseCRUDUpdateFailures:
|
||||
with patch.object(
|
||||
session, "rollback", new_callable=AsyncMock
|
||||
) as mock_rollback:
|
||||
with pytest.raises(IntegrityConstraintError, match="Database operation failed"):
|
||||
with pytest.raises(
|
||||
IntegrityConstraintError, match="Database operation failed"
|
||||
):
|
||||
await user_crud.update(
|
||||
session, db_obj=user, obj_in={"first_name": "Updated"}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user