Marketplace tests update

This commit is contained in:
2025-09-24 22:28:44 +02:00
parent f9879126c8
commit cea88a46c5
16 changed files with 613 additions and 73 deletions

View File

@@ -9,7 +9,7 @@ This module provides classes and functions for:
"""
import logging
from datetime import datetime
from datetime import datetime, timezone
from typing import List, Optional
from sqlalchemy import func
@@ -106,7 +106,7 @@ class MarketplaceService:
shop_id=shop.id, # Foreign key to shops table
shop_name=shop.shop_name, # Use shop.shop_name (the display name)
user_id=user.id,
created_at=datetime.utcnow(),
created_at=datetime.now(timezone.utc),
)
db.add(import_job)
@@ -360,7 +360,7 @@ class MarketplaceService:
raise ImportJobCannotBeCancelledException(job_id, job.status)
job.status = "cancelled"
job.completed_at = datetime.utcnow()
job.completed_at = datetime.now(timezone.utc)
db.commit()
db.refresh(job)