Skip to content

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

Initial tests work

Rafał Pitońfcf42b004f20
diff --git a/requirements.in b/requirements.in
index 27bba77ccf..91c19a57ef 100644
--- a/requirements.in
+++ b/requirements.in
@@ -28,7 +28,7 @@ elasticsearch>=5.4,<6.0.0
elasticsearch-dsl>=5.0.0,<6.0.0
faker>=0.7.7
freezegun>=0.3.9
-google-measurement-protocol
+google-measurement-protocol>=1.0.0
google-i18n-address>=2.0.3
graphene-django>=2.0.dev
jsonfield>=2.0.2
diff --git a/requirements.txt b/requirements.txt
index 20dd015e42..1f70a97dd4 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -52,7 +52,7 @@ elasticsearch==5.5.2
faker==0.8.11
freezegun==0.3.9
google-i18n-address==2.2.2
-google-measurement-protocol==0.1.6
+google-measurement-protocol==1.0.0
graphene-django==2.0.0
graphene==2.0.1 # via graphene-django
graphql-core==2.0 # via graphene, graphql-relay
diff --git a/saleor/core/analytics.py b/saleor/core/analytics.py
index 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.py
new file mode 100644
index 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)