Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix test timezone
Przemysław Łada9b37742897b7
diff --git a/saleor/plugins/invoicing/tests/test_invoicing.py b/saleor/plugins/invoicing/tests/test_invoicing.pyindex b360ab8beb..6102f8104a 100644--- a/saleor/plugins/invoicing/tests/test_invoicing.py+++ b/saleor/plugins/invoicing/tests/test_invoicing.py@@ -1,6 +1,8 @@from datetime import datetimefrom unittest.mock import Mock, patch+import pytz+from ....plugins.invoicing.utils import (chunk_products,generate_invoice_number,@@ -40,7 +42,7 @@ def test_generate_invoice_pdf_for_order(get_template_mock.return_value.render.assert_called_once_with({"invoice": fulfilled_order.invoices.first(),- "creation_date": datetime.today().strftime("%d %b %Y"),+ "creation_date": datetime.now(tz=pytz.utc).strftime("%d %b %Y"),"order": fulfilled_order,"font_path": "file://test","products_first_page": list(fulfilled_order.lines.all()),