fix(loyalty): replace broad exception handlers with specific types and rename onboarding service
- Replace `except Exception` with specific exception types in google_wallet_service.py (requests.RequestException, ValueError, etc.) and apple_wallet_service.py (httpx.HTTPError, OSError, ssl.SSLError) - Rename loyalty_onboarding.py -> loyalty_onboarding_service.py to match NAM-002 naming convention (+ test file + imports) - Add PasswordChangeResponse Pydantic model to user_account API, removing raw dict return and noqa suppression Resolves 12 EXC-003 + 1 NAM-002 architecture warnings in loyalty module. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# app/modules/loyalty/tests/unit/test_loyalty_onboarding.py
|
||||
# app/modules/loyalty/tests/unit/test_loyalty_onboarding_service.py
|
||||
"""Unit tests for LoyaltyOnboardingProvider."""
|
||||
|
||||
import uuid
|
||||
@@ -6,7 +6,9 @@ import uuid
|
||||
import pytest
|
||||
|
||||
from app.modules.loyalty.models.loyalty_program import LoyaltyProgram, LoyaltyType
|
||||
from app.modules.loyalty.services.loyalty_onboarding import LoyaltyOnboardingProvider
|
||||
from app.modules.loyalty.services.loyalty_onboarding_service import (
|
||||
LoyaltyOnboardingProvider,
|
||||
)
|
||||
from app.modules.tenancy.models import Merchant, Store, User
|
||||
|
||||
|
||||
Reference in New Issue
Block a user