Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove deprecated value from AttributeValue in API
fowczarekcdd93a834938
diff --git a/saleor/graphql/product/types/attributes.py b/saleor/graphql/product/types/attributes.pyindex c0386da82d..e64482514a 100644--- a/saleor/graphql/product/types/attributes.py+++ b/saleor/graphql/product/types/attributes.py@@ -51,10 +51,6 @@ class AttributeValue(CountableDjangoObjectType):name = graphene.String(description=AttributeValueDescriptions.NAME)slug = graphene.String(description=AttributeValueDescriptions.SLUG)type = AttributeValueType(description=AttributeValueDescriptions.TYPE)- value = graphene.String(- description=AttributeValueDescriptions.VALUE,- deprecation_reason="This field is deprecated",- )translation = graphene.Field(AttributeValueTranslation,language_code=graphene.Argument(diff --git a/tests/api/test_attributes.py b/tests/api/test_attributes.pyindex f9fd5ff8e4..9f3789a091 100644--- a/tests/api/test_attributes.py+++ b/tests/api/test_attributes.py@@ -777,7 +777,6 @@ CREATE_ATTRIBUTE_VALUE_QUERY = """nametypeslug- value}}}@@ -803,7 +802,6 @@ def test_create_attribute_value(attr_data = data["attributeValue"]assert attr_data["name"] == nameassert attr_data["slug"] == slugify(name)- assert attr_data["value"] == valueassert attr_data["type"] == "STRING"assert name in [value["name"] for value in data["attribute"]["values"]]@@ -842,7 +840,6 @@ mutation updateChoice(attributeValue {nameslug- value}attribute {values {@@ -892,23 +889,6 @@ def test_update_attribute_value_name_not_unique(assert data["errors"][0]["field"] == "name"-def test_update_same_attribute_value(- staff_api_client, pink_attribute_value, permission_manage_products-):- query = UPDATE_ATTRIBUTE_VALUE_QUERY- value = pink_attribute_value- node_id = graphene.Node.to_global_id("AttributeValue", value.id)- attr_value = "#BLUE"- variables = {"name": value.name, "value": attr_value, "id": node_id}- response = staff_api_client.post_graphql(- query, variables, permissions=[permission_manage_products]- )- content = get_graphql_content(response)- data = content["data"]["attributeValueUpdate"]- assert not data["errors"]- assert data["attributeValue"]["value"] == attr_value--def test_delete_attribute_value(staff_api_client, color_attribute, pink_attribute_value, permission_manage_products):@@ -1015,7 +995,7 @@ def test_resolve_assigned_attribute_without_values(api_client, product_type, proslug}values {- value+ name}}variants {@@ -1024,7 +1004,7 @@ def test_resolve_assigned_attribute_without_values(api_client, product_type, proslug}values {- value+ name}}}