Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Adjust cassettes to new elasticsearch
fowczarek271b936018e1
diff --git a/saleor/search/documents.py b/saleor/search/documents.pyindex 1b7bc3c379..653d00c5c8 100644--- a/saleor/search/documents.py+++ b/saleor/search/documents.py@@ -71,10 +71,14 @@ class OrderDocument(DocType):return instance.user_emaildef prepare_first_name(self, instance):- return get_user_first_name(instance.user)+ if instance.user:+ return get_user_first_name(instance.user)+ return Nonedef prepare_last_name(self, instance):- return get_user_last_name(instance.user)+ if instance.user:+ return get_user_last_name(instance.user)+ return Noneclass Meta:model = Orderdiff --git a/tests/cassettes/test_dashboard_search_orders_by_user_email.yaml b/tests/cassettes/test_dashboard_search_orders_by_user_email.yamlindex 27a1b1abc5..778cdc004c 100644--- a/tests/cassettes/test_dashboard_search_orders_by_user_email.yaml+++ b/tests/cassettes/test_dashboard_search_orders_by_user_email.yaml@@ -7,9 +7,9 @@ interactions:connection: [keep-alive]content-type: [application/json]method: GET- uri: http://search:9200/storefront/product_document/_search+ uri: http://search:9200/storefront/doc/_searchresponse:- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":3,"max_score":5.373132,"hits":[{"_index":"storefront","_type":"product_document","_id":"1","_score":5.373132,"_source":{}},{"_index":"storefront","_type":"product_document","_id":"18","_score":3.740644,"_source":{}},{"_index":"storefront","_type":"product_document","_id":"38","_score":3.740644,"_source":{}}]}}'}+ body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":3,"max_score":5.373132,"hits":[{"_index":"storefront","_type":"doc","_id":"1","_score":5.373132,"_source":{}},{"_index":"storefront","_type":"doc","_id":"18","_score":3.740644,"_source":{}},{"_index":"storefront","_type":"doc","_id":"38","_score":3.740644,"_source":{}}]}}'}headers:content-length: ['403']content-type: [application/json; charset=UTF-8]@@ -22,9 +22,9 @@ interactions:connection: [keep-alive]content-type: [application/json]method: GET- uri: http://search:9200/users/user_document/_search+ uri: http://search:9200/users/doc/_searchresponse:- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":5.1992044,"hits":[{"_index":"users","_type":"user_document","_id":"2","_score":5.1992044,"_source":{}}]}}'}+ body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":5.1992044,"hits":[{"_index":"users","_type":"doc","_id":"2","_score":5.1992044,"_source":{}}]}}'}headers:content-length: ['211']content-type: [application/json; charset=UTF-8]@@ -37,9 +37,9 @@ interactions:connection: [keep-alive]content-type: [application/json]method: GET- uri: http://search:9200/orders/order_document/_search+ uri: http://search:9200/orders/doc/_searchresponse:- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":2,"max_score":2.1282318,"hits":[{"_index":"orders","_type":"order_document","_id":"17","_score":2.1282318,"_source":{}},{"_index":"orders","_type":"order_document","_id":"11","_score":2.1282318,"_source":{}}]}}'}+ body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":2,"max_score":2.1282318,"hits":[{"_index":"orders","_type":"doc","_id":"17","_score":2.1282318,"_source":{}},{"_index":"orders","_type":"doc","_id":"11","_score":2.1282318,"_source":{}}]}}'}headers:content-length: ['302']content-type: [application/json; charset=UTF-8]diff --git a/tests/cassettes/test_dashboard_search_orders_by_user_name.yaml b/tests/cassettes/test_dashboard_search_orders_by_user_name.yamlindex c799a0cf16..9d4fa15bf2 100644--- a/tests/cassettes/test_dashboard_search_orders_by_user_name.yaml+++ b/tests/cassettes/test_dashboard_search_orders_by_user_name.yaml@@ -7,9 +7,9 @@ interactions:connection: [keep-alive]content-type: [application/json]method: GET- uri: http://search:9200/storefront/product_document/_search+ uri: http://search:9200/storefront/doc/_searchresponse:- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":3,"max_score":5.373132,"hits":[{"_index":"storefront","_type":"product_document","_id":"1","_score":5.373132,"_source":{}},{"_index":"storefront","_type":"product_document","_id":"18","_score":3.740644,"_source":{}},{"_index":"storefront","_type":"product_document","_id":"38","_score":3.740644,"_source":{}}]}}'}+ body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":3,"max_score":5.373132,"hits":[{"_index":"storefront","_type":"doc","_id":"1","_score":5.373132,"_source":{}},{"_index":"storefront","_type":"doc","_id":"18","_score":3.740644,"_source":{}},{"_index":"storefront","_type":"doc","_id":"38","_score":3.740644,"_source":{}}]}}'}headers:content-length: ['403']content-type: [application/json; charset=UTF-8]@@ -22,9 +22,9 @@ interactions:connection: [keep-alive]content-type: [application/json]method: GET- uri: http://search:9200/users/user_document/_search+ uri: http://search:9200/users/doc/_searchresponse:- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":2.7725887,"hits":[{"_index":"users","_type":"user_document","_id":"2","_score":2.7725887,"_source":{}}]}}'}+ body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":2.7725887,"hits":[{"_index":"users","_type":"doc","_id":"2","_score":2.7725887,"_source":{}}]}}'}headers:content-length: ['211']content-type: [application/json; charset=UTF-8]@@ -36,9 +36,9 @@ interactions:connection: [keep-alive]content-type: [application/json]method: GET- uri: http://search:9200/orders/order_document/_search+ uri: http://search:9200/orders/doc/_searchresponse:- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":2,"max_score":1.1631508,"hits":[{"_index":"orders","_type":"order_document","_id":"17","_score":1.1631508,"_source":{}},{"_index":"orders","_type":"order_document","_id":"11","_score":1.1631508,"_source":{}}]}}'}+ body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":2,"max_score":1.1631508,"hits":[{"_index":"orders","_type":"doc","_id":"17","_score":1.1631508,"_source":{}},{"_index":"orders","_type":"doc","_id":"11","_score":1.1631508,"_source":{}}]}}'}headers:content-length: ['302']content-type: [application/json; charset=UTF-8]diff --git a/tests/cassettes/test_dashboard_search_orders_by_user_name_without_address.yaml b/tests/cassettes/test_dashboard_search_orders_by_user_name_without_address.yamlindex 163324cef7..b744f96040 100644--- a/tests/cassettes/test_dashboard_search_orders_by_user_name_without_address.yaml+++ b/tests/cassettes/test_dashboard_search_orders_by_user_name_without_address.yaml@@ -7,7 +7,7 @@ interactions:connection: [keep-alive]content-type: [application/json]method: GET- uri: http://search:9200/storefront/product_document/_search+ uri: http://search:9200/storefront/doc/_searchresponse:body: {string: '{"took":0,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}headers:@@ -22,9 +22,9 @@ interactions:connection: [keep-alive]content-type: [application/json]method: GET- uri: http://search:9200/users/user_document/_search+ uri: http://search:9200/users/doc/_searchresponse:- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":2.261763,"hits":[{"_index":"users","_type":"user_document","_id":"17","_score":2.261763,"_source":{}}]}}'}+ body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":2.261763,"hits":[{"_index":"users","_type":"doc","_id":"17","_score":2.261763,"_source":{}}]}}'}headers:content-length: ['210']content-type: [application/json; charset=UTF-8]@@ -36,9 +36,9 @@ interactions:connection: [keep-alive]content-type: [application/json]method: GET- uri: http://search:9200/orders/order_document/_search+ uri: http://search:9200/orders/doc/_searchresponse:- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":1.6739764,"hits":[{"_index":"orders","_type":"order_document","_id":"15","_score":1.6739764,"_source":{}}]}}'}+ body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":1.6739764,"hits":[{"_index":"orders","_type":"doc","_id":"15","_score":1.6739764,"_source":{}}]}}'}headers:content-length: ['214']content-type: [application/json; charset=UTF-8]diff --git a/tests/cassettes/test_dashboard_search_user_name_without_address.yaml b/tests/cassettes/test_dashboard_search_user_name_without_address.yamlindex b9bd241320..71c3043442 100644--- a/tests/cassettes/test_dashboard_search_user_name_without_address.yaml+++ b/tests/cassettes/test_dashboard_search_user_name_without_address.yaml@@ -7,7 +7,7 @@ interactions:connection: [keep-alive]content-type: [application/json]method: GET- uri: http://search:9200/storefront/product_document/_search+ uri: http://search:9200/storefront/doc/_searchresponse:body: {string: '{"took":2,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}headers:@@ -22,9 +22,9 @@ interactions:connection: [keep-alive]content-type: [application/json]method: GET- uri: http://search:9200/users/user_document/_search+ uri: http://search:9200/users/doc/_searchresponse:- body: {string: '{"took":23,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":2.730029,"hits":[{"_index":"users","_type":"user_document","_id":"22","_score":2.730029,"_source":{}}]}}'}+ body: {string: '{"took":23,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":2.730029,"hits":[{"_index":"users","_type":"doc","_id":"22","_score":2.730029,"_source":{}}]}}'}headers:content-length: ['211']content-type: [application/json; charset=UTF-8]@@ -36,7 +36,7 @@ interactions:connection: [keep-alive]content-type: [application/json]method: GET- uri: http://search:9200/orders/order_document/_search+ uri: http://search:9200/orders/doc/_searchresponse:body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}headers: