Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Initial tests work
Rafał Pitońfcf42b004f20
diff --git a/requirements.in b/requirements.inindex 27bba77ccf..91c19a57ef 100644--- a/requirements.in+++ b/requirements.in@@ -28,7 +28,7 @@ elasticsearch>=5.4,<6.0.0elasticsearch-dsl>=5.0.0,<6.0.0faker>=0.7.7freezegun>=0.3.9-google-measurement-protocol+google-measurement-protocol>=1.0.0google-i18n-address>=2.0.3graphene-django>=2.0.devjsonfield>=2.0.2diff --git a/requirements.txt b/requirements.txtindex 20dd015e42..1f70a97dd4 100644--- a/requirements.txt+++ b/requirements.txt@@ -52,7 +52,7 @@ elasticsearch==5.5.2faker==0.8.11freezegun==0.3.9google-i18n-address==2.2.2-google-measurement-protocol==0.1.6+google-measurement-protocol==1.0.0graphene-django==2.0.0graphene==2.0.1 # via graphene-djangographql-core==2.0 # via graphene, graphql-relaydiff --git a/saleor/core/analytics.py b/saleor/core/analytics.pyindex a7169500b2..cee8fc023e 100644--- a/saleor/core/analytics.py+++ b/saleor/core/analytics.py@@ -48,7 +48,7 @@ def report_view(client_id, path, language, headers):def report_order(client_id, order):items = [- ga.Item(+ ga.item(ol.product_name, ol.get_price_per_item(), quantity=ol.quantity,item_id=ol.product_sku)for ol in order]diff --git a/tests/test_analytics.py b/tests/test_analytics.pynew file mode 100644index 0000000000..98bf2bfc74--- /dev/null+++ b/tests/test_analytics.py@@ -0,0 +1,5 @@+from saleor.core.analytics import report_order+++def test_report_order(order_with_lines):+ report_order('', order_with_lines)