Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix failing tests

Anna Siwik356da590a3f1
diff --git a/saleor/core/utils/random_data.py b/saleor/core/utils/random_data.py
index 00345fc4c9..b25a15d634 100644
--- a/saleor/core/utils/random_data.py
+++ b/saleor/core/utils/random_data.py
@@ -419,6 +419,7 @@ def create_fulfillments(order):
def create_fake_order():
+
user = random.choice([None, User.objects.filter(
is_superuser=False).order_by('?').first()])
if user:
@@ -438,7 +439,8 @@ def create_fake_order():
shipping_price = shipping_method.price_per_country.first().price
order_data.update({
'shipping_method_name': shipping_method.name,
- 'shipping_price': shipping_price})
+ 'shipping_price_net': shipping_price,
+ 'shipping_price_gross': shipping_price})
order = Order.objects.create(**order_data)
diff --git a/templates/templated_email/source/order/confirm_fulfillment.email b/templates/templated_email/source/order/confirm_fulfillment.email
index d52df5c6e1..c643cf1f64 100644
--- a/templates/templated_email/source/order/confirm_fulfillment.email
+++ b/templates/templated_email/source/order/confirm_fulfillment.email
@@ -1,5 +1,4 @@
{% load i18n %}
-{% load gross from prices_i18n %}
{% block subject %}
{% blocktrans trimmed with order=fulfillment.order context "Fulfillment confirmation email subject" %}
diff --git a/templates/templated_email/source/order/partials/_fulfillment_lines.mjml b/templates/templated_email/source/order/partials/_fulfillment_lines.mjml
index 279df47c2b..c67dba90db 100644
--- a/templates/templated_email/source/order/partials/_fulfillment_lines.mjml
+++ b/templates/templated_email/source/order/partials/_fulfillment_lines.mjml
@@ -1,10 +1,3 @@
-<mj-section css-class="no-display">
- <mj-column>
- <mj-text>
- {% load gross from prices_i18n %}
- </mj-text>
- </mj-column>
-</mj-section>
<mj-section>
<mj-column>
<mj-table>
diff --git a/templates/templated_email/source/order/update_fulfillment.email b/templates/templated_email/source/order/update_fulfillment.email
index 842faae47c..cd46ae40b2 100644
--- a/templates/templated_email/source/order/update_fulfillment.email
+++ b/templates/templated_email/source/order/update_fulfillment.email
@@ -1,5 +1,4 @@
{% load i18n %}
-{% load gross from prices_i18n %}
{% block subject %}
{% blocktrans trimmed with order=fulfillment.order context "Fulfillment update email subject" %}
diff --git a/tests/test_order.py b/tests/test_order.py
index 4011e0fce8..e513e48f30 100644
--- a/tests/test_order.py
+++ b/tests/test_order.py
@@ -1,3 +1,4 @@
+from decimal import Decimal
from unittest.mock import Mock
from django.urls import reverse