Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Rename error message
Damian We18fad792c5f
diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.pyindex b174ce16c7..61f9a1e39d 100644--- a/saleor/graphql/checkout/mutations.py+++ b/saleor/graphql/checkout/mutations.py@@ -360,8 +360,7 @@ class CheckoutLinesAdd(BaseMutation):)except ProductNotPublished as exc:raise ValidationError(- "Can't create checkout with unpublished product.",- code=exc.code,+ "Can't add unpublished product.", code=exc.code,)lines = list(checkout)diff --git a/tests/api/test_checkout.py b/tests/api/test_checkout.pyindex e55e0b8a56..bc8b0a0e50 100644--- a/tests/api/test_checkout.py+++ b/tests/api/test_checkout.py@@ -774,7 +774,7 @@ def test_checkout_lines_add_with_unpublished_product(content = get_graphql_content(response)error = content["data"]["checkoutLinesAdd"]["checkoutErrors"][0]- assert error["message"] == "Can't create checkout with unpublished product."+ assert error["message"] == "Can't add unpublished product."assert error["code"] == "PRODUCT_NOT_PUBLISHED"@@ -992,7 +992,7 @@ def test_checkout_lines_update_with_unpublished_product(content = get_graphql_content(response)error = content["data"]["checkoutLinesUpdate"]["checkoutErrors"][0]- assert error["message"] == "Can't create checkout with unpublished product."+ assert error["message"] == "Can't add unpublished product."assert error["code"] == "PRODUCT_NOT_PUBLISHED"