Skip to content

Commit 994dbb7

Browse files
Nicolas CANNicolas CAN
authored andcommitted
✅(backend) fix failing test on refund an order
Fix a failing flaky unit test on refund an order when its state is canceled. Once a refund is requested an email should be sent to notify the user. The content email based on mjml templates and the footer part use a variable to fill the catalog base url. None as default, we override it with the override_settings before function definition to check its value.
1 parent 75c374c commit 994dbb7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/joanie/tests/core/api/admin/orders/test_refund.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ def test_api_admin_orders_refund_an_order_not_possible_if_no_installment_is_paid
156156

157157
@override_settings(
158158
JOANIE_CATALOG_NAME="Test Catalog",
159+
JOANIE_CATALOG_BASE_URL="https://richie.education",
159160
DEFAULT_CURRENCY="EUR",
160161
JOANIE_PAYMENT_SCHEDULE_LIMITS={
161162
100: (20, 30, 30, 20),
@@ -327,7 +328,7 @@ def test_api_admin_orders_refund_an_order(self):
327328
f"Withdrawn on {order.payment_schedule[3]['due_date'].strftime('%m/%d/%Y')}",
328329
"Canceled",
329330
"Total €100.00",
330-
f"This mail has been sent to {order.owner.email} by Test Catalog [None]",
331+
f"This mail has been sent to {order.owner.email} by Test Catalog [https://richie.education]",
331332
]
332333

333334
self.assertEqual(

0 commit comments

Comments
 (0)