Pruebas para las vistas relacionadas con pagos
Definition at line 10 of file test_payment_views.py.
◆ setUp()
test_payment_views.PaymentViewsTests.setUp |
( |
| self | ) |
|
◆ test_create_preference_cart_service_error()
test_payment_views.PaymentViewsTests.test_create_preference_cart_service_error |
( |
| self, |
|
|
| mock_cart_service ) |
◆ test_create_preference_empty_cart()
test_payment_views.PaymentViewsTests.test_create_preference_empty_cart |
( |
| self, |
|
|
| mock_cart_service ) |
◆ test_create_preference_success()
test_payment_views.PaymentViewsTests.test_create_preference_success |
( |
| self, |
|
|
| mock_mp_service, |
|
|
| mock_cart_service ) |
◆ cart_data
test_payment_views.PaymentViewsTests.cart_data |
Initial value:= {
"productos": [
{
"id": 1,
"nombre": "Hamburguesa Clásica",
"descripcion": "Hamburguesa con queso y lechuga",
"precio": 500.0,
"cantidad": 2
}
],
"total": 1000.0
}
Definition at line 19 of file test_payment_views.py.
◆ client
test_payment_views.PaymentViewsTests.client = APIClient() |
◆ create_preference_url
test_payment_views.PaymentViewsTests.create_preference_url = reverse('payment_service:create-preference') |
◆ factory
test_payment_views.PaymentViewsTests.factory = RequestFactory() |
◆ preference_data
dict test_payment_views.PaymentViewsTests.preference_data |
Initial value:= {
"id": "test_preference_id",
"init_point": "https://www.mercadopago.com/init_point",
"sandbox_init_point": "https://sandbox.mercadopago.com/init_point",
"items": [
{
"id": "1",
"title": "Hamburguesa Clásica",
"description": "Hamburguesa con queso y lechuga",
"quantity": 2,
"unit_price": 500.0,
"currency_id": "ARS"
}
]
}
Definition at line 31 of file test_payment_views.py.
The documentation for this class was generated from the following file: