refactor(tests): replace crud references with repo across repository test files
- Updated import statements and test logic to align with `repositories` naming changes. - Adjusted documentation and test names for consistency with the updated naming convention. - Improved test descriptions to reflect the repository-based structure.
This commit is contained in:
@@ -91,9 +91,9 @@ class TestInitDb:
|
||||
"""Test that init_db handles database errors gracefully."""
|
||||
_test_engine, SessionLocal = async_test_db
|
||||
|
||||
# Mock user_crud.get_by_email to raise an exception
|
||||
# Mock user_repo.get_by_email to raise an exception
|
||||
with patch(
|
||||
"app.init_db.user_crud.get_by_email",
|
||||
"app.init_db.user_repo.get_by_email",
|
||||
side_effect=Exception("Database error"),
|
||||
):
|
||||
with patch("app.init_db.SessionLocal", SessionLocal):
|
||||
|
||||
Reference in New Issue
Block a user