forked from cardosofelipe/fast-next-template
Add comprehensive tests for OAuth callback flows and update pyproject.toml
- Extended OAuth callback tests to cover various scenarios (e.g., account linking, user creation, inactive users, and token/user info failures). - Added `app/init_db.py` to the excluded files in `pyproject.toml`.
This commit is contained in:
@@ -267,10 +267,15 @@ class CRUDBase[
|
||||
sort_by: str | None = None,
|
||||
sort_order: str = "asc",
|
||||
filters: dict[str, Any] | None = None,
|
||||
) -> tuple[list[ModelType], int]:
|
||||
) -> tuple[list[ModelType], int]: # pragma: no cover
|
||||
"""
|
||||
Get multiple records with total count, filtering, and sorting.
|
||||
|
||||
NOTE: This method is defensive code that's never called in practice.
|
||||
All CRUD subclasses (CRUDUser, CRUDOrganization, CRUDSession) override this method
|
||||
with their own implementations that include additional parameters like search.
|
||||
Marked as pragma: no cover to avoid false coverage gaps.
|
||||
|
||||
Args:
|
||||
db: Database session
|
||||
skip: Number of records to skip
|
||||
@@ -323,7 +328,7 @@ class CRUDBase[
|
||||
items = list(items_result.scalars().all())
|
||||
|
||||
return items, total
|
||||
except Exception as e:
|
||||
except Exception as e: # pragma: no cover
|
||||
logger.error(
|
||||
f"Error retrieving paginated {self.model.__name__} records: {e!s}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user