feat: add tests command

This commit is contained in:
2026-05-09 00:02:33 +03:00
parent 152a8ed6ac
commit 22f27fa524
10 changed files with 197 additions and 25 deletions

View File

@@ -3,12 +3,12 @@ import orjson
from fastapi import APIRouter, Depends, Request
from fastapi.responses import ORJSONResponse
from src.application.commands import CreateOrderCommand
from src.application.commands import CreatePaymentCommand
from src.application.commands import CreatePaymentCloudkassirCommand
from src.application.contracts import ILogger
from src.application.domain.dto import AuthContext
from src.application.domain.enums import OrderStatus
from src.presentation.decorators import require_access_token, csrf_protect
from src.presentation.dependencies.commands import get_create_order_command, get_create_payment_command
from src.presentation.dependencies.commands import get_create_order_command, get_create_payment_cloudkassir_command
from src.presentation.dependencies.logger import get_logger
from src.presentation.schemas.order import CreateOrder
from src.presentation.schemas.itpay_payment_models import ItpayPaymentData
@@ -73,8 +73,8 @@ async def create_order(
@order_router.post('/webhook/itpay')
async def itpay_webhook(
request: Request,
payment_command: CreatePaymentCommand = Depends(get_create_payment_command),
logger: ILogger = Depends(get_logger)
payment_command: CreatePaymentCloudkassirCommand = Depends(get_create_payment_cloudkassir_command),
logger: ILogger = Depends(get_logger),
) -> ORJSONResponse:
raw = await request.body()
ct = (request.headers.get('content-type') or '').lower()