fix: cleanup

This commit is contained in:
2026-03-20 10:30:52 +01:00
parent 78f03e139f
commit 5f52959a20
4 changed files with 4 additions and 30 deletions
+4 -5
View File
@@ -1,14 +1,13 @@
import base64
import json
from decimal import Decimal
from django.test import TestCase
from unittest.mock import patch
import pytest
from django.contrib.auth import get_user_model
from django.urls import reverse
from django.utils import timezone
from rest_framework import status
from rest_framework.test import APITestCase
from config.tests.mixins import Response
from shop.exceptions import RedsysPaymentException
@@ -35,7 +34,7 @@ def redsys_response_error(*args, **kwargs):
return Response(response, status_code=200)
class TestRedsysTPV(APITestCase, CreateProductsMixin):
class TestRedsysTPV(TestCase, CreateProductsMixin):
def setUp(self):
self.tax = Tax.objects.create(code='IVA', value=21)
self.customer = get_user_model().objects.create_user(
@@ -129,7 +128,7 @@ class TestRedsysTPV(APITestCase, CreateProductsMixin):
},
)
self.order.refresh_from_db()
assert response.status_code == status.HTTP_200_OK
assert response.status_code == 200
assert self.order.status == Order.Statuses.STATUS_PAID
def test_redsys_webhook_payment_error(self):
@@ -167,7 +166,7 @@ class TestRedsysTPV(APITestCase, CreateProductsMixin):
},
)
assert response.status_code == status.HTTP_409_CONFLICT
assert response.status_code == 409
self.order.refresh_from_db()
assert self.order.status == Order.Statuses.STATUS_ERROR