Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Adjust code to recent changes after rebase
Marcin Gębala781be119d88b
diff --git a/saleor/graphql/product/mutations.py b/saleor/graphql/product/mutations.pyindex 99ace8b087..57922c4bd1 100644--- a/saleor/graphql/product/mutations.py+++ b/saleor/graphql/product/mutations.py@@ -64,6 +64,8 @@ class CategoryDelete(ModelDeleteMutation):class CollectionInput(graphene.InputObjectType):+ is_published = graphene.Boolean(+ description='Informs whether a collection is published.')name = graphene.String(description='Name of the collection.')slug = graphene.String(description='Slug of the collection.')products = graphene.List(@@ -172,15 +174,17 @@ class AttributeValueInput(InputObjectType):class ProductInput(graphene.InputObjectType):- name = graphene.String()- description = graphene.String()- product_type = graphene.ID()- category = graphene.ID()- price = graphene.Float()+ attributes = graphene.List(AttributeValueInput)available_on = graphene.String()+ category = graphene.ID()+ charge_taxes = graphene.Boolean()+ description = graphene.String()is_published = graphene.Boolean()is_featured = graphene.Boolean()- attributes = graphene.List(AttributeValueInput)+ name = graphene.String()+ product_type = graphene.ID()+ price = graphene.Float()+ tax_rate = graphene.String()class ProductCreateMutation(ModelMutation):@@ -255,6 +259,7 @@ class ProductVariantInput(graphene.InputObjectType):product = graphene.ID()sku = graphene.String()quantity = graphene.Int()+ track_inventory = graphene.Boolean()class ProductVariantCreateMutation(ModelMutation):diff --git a/tests/api/test_graphql.py b/tests/api/test_graphql.pyindex 0ed606a132..cc8e7a2375 100644--- a/tests/api/test_graphql.py+++ b/tests/api/test_graphql.py@@ -1,12 +1,15 @@import json+from unittest.mock import Mock, patchimport graphene+import pytestfrom django.contrib.auth.models import AnonymousUserfrom django.db.models import Qfrom django.http import HttpResponsefrom django.shortcuts import reversefrom django.test import RequestFactoryfrom graphql_jwt.shortcuts import get_token+from graphql_relay import to_global_idfrom tests.utils import get_graphql_contentfrom saleor.graphql.middleware import jwt_middlewarediff --git a/tests/api/test_product.py b/tests/api/test_product.pyindex 52e78b00c5..5ba9e72665 100644--- a/tests/api/test_product.py+++ b/tests/api/test_product.py@@ -349,16 +349,16 @@ def test_create_product(admin_api_client, product_type, default_category, size_attribute):query = """mutation createProduct(- $productTypeId: ID,- $categoryId: ID- $name: String,- $description: String,- $isPublished: Boolean,- $isFeatured: Boolean,+ $productTypeId: ID!,+ $categoryId: ID!+ $name: String!,+ $description: String!,+ $isPublished: Boolean!,+ $isFeatured: Boolean!,$chargeTaxes: Boolean!,$taxRate: String!,- $price: Float,- $attributes: [AttributeValueInput]) {+ $price: Float!,+ $attributes: [AttributeValueInput!]) {productCreate(input: {category: $categoryId,@@ -469,7 +469,7 @@ def test_update_product(query = """mutation updateProduct($productId: ID!,- $categoryId: ID,+ $categoryId: ID!,$name: String!,$description: String!,$isPublished: Boolean!,@@ -477,7 +477,7 @@ def test_update_product($chargeTaxes: Boolean!,$taxRate: String!,$price: Float!,- $attributes: [AttributeValueInput]) {+ $attributes: [AttributeValueInput!]) {productUpdate(id: $productId,input: {