fix: QA fixes for property decisions feature
- Replace deprecated datetime.utcnow() with datetime.now(UTC) in model and repository - Add listing_type validation to decision_service (RENT/BUY only) - Fix decision filtering tests failing due to rate limiting by patching _match_endpoint - Add SwipeCard component test suite (11 tests covering rendering, interactions, and POI distances) - Add test for invalid listing_type validation
This commit is contained in:
parent
8452f65d25
commit
49280d9679
6 changed files with 149 additions and 7 deletions
|
|
@ -1,5 +1,5 @@
|
|||
"""Repository for listing decisions (like/dislike)."""
|
||||
from datetime import datetime
|
||||
from datetime import datetime, UTC
|
||||
|
||||
from models.decision import ListingDecision
|
||||
from sqlalchemy import Engine
|
||||
|
|
@ -24,7 +24,7 @@ class DecisionRepository:
|
|||
existing = session.exec(statement).first()
|
||||
if existing:
|
||||
existing.decision = decision
|
||||
existing.updated_at = datetime.utcnow()
|
||||
existing.updated_at = datetime.now(UTC)
|
||||
session.add(existing)
|
||||
session.commit()
|
||||
session.refresh(existing)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue