Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Rename tests and remove unnecessary else
Gabriel L Martinez042ce73366ae
diff --git a/saleor/graphql/core/fields.py b/saleor/graphql/core/fields.pyindex 8aa8f7d03d..344b710afc 100644--- a/saleor/graphql/core/fields.py+++ b/saleor/graphql/core/fields.py@@ -193,8 +193,7 @@ class FilterInputConnectionField(BaseDjangoConnectionField):# Make sure filter input has valid valuesif not instance.is_valid():raise ValidationError(instance.errors, code="invalid_list")- else:- iterable = instance.qs+ iterable = instance.qsif Promise.is_thenable(iterable):return Promise.resolve(iterable).then(on_resolve)diff --git a/tests/api/test_attributes.py b/tests/api/test_attributes.pyindex 5a6294de1d..168d9ccd72 100644--- a/tests/api/test_attributes.py+++ b/tests/api/test_attributes.py@@ -115,7 +115,7 @@ NOT_EXISTS_IDS_ATTRIBUTES_QUERY = """@pytest.mark.parametrize("attribute_filter", [{"ids": ["ygRqjpmXYqaTD9r=", "PBa4ZLBhnXHSz6v="]}],)-def test_attribute_not_exit_ids(attribute_filter, user_api_client, category):+def test_attributes_query_ids_not_exists(attribute_filter, user_api_client, category):query = NOT_EXISTS_IDS_ATTRIBUTES_QUERYvariables = {"filter": attribute_filter}response = user_api_client.post_graphql(query, variables)diff --git a/tests/api/test_category.py b/tests/api/test_category.pyindex 0b0b691ee1..73eb69d511 100644--- a/tests/api/test_category.py+++ b/tests/api/test_category.py@@ -698,7 +698,7 @@ NOT_EXISTS_IDS_CATEGORIES_QUERY = """@pytest.mark.parametrize("category_filter", [{"ids": ["W3KATGDn3fq3ZH4=", "zH9pYmz7yWD3Hy8="]}],)-def test_category_not_exit_ids(category_filter, user_api_client, category):+def test_categories_query_ids_not_exists(category_filter, user_api_client, category):query = NOT_EXISTS_IDS_CATEGORIES_QUERYvariables = {"filter": category_filter}response = user_api_client.post_graphql(query, variables)diff --git a/tests/api/test_collection.py b/tests/api/test_collection.pyindex f311fcceac..64177d433e 100644--- a/tests/api/test_collection.py+++ b/tests/api/test_collection.py@@ -615,7 +615,7 @@ NOT_EXISTS_IDS_COLLECTIONS_QUERY = """@pytest.mark.parametrize("collection_filter", [{"ids": ["ncXc5tP7kmV6pxE=", "yMyDVE5S2LWWTqK="]}],)-def test_collection_not_exit_ids(collection_filter, user_api_client, category):+def test_collections_query_ids_not_exists(collection_filter, user_api_client, category):query = NOT_EXISTS_IDS_COLLECTIONS_QUERYvariables = {"filter": collection_filter}response = user_api_client.post_graphql(query, variables)diff --git a/tests/api/test_product.py b/tests/api/test_product.pyindex 9a4d4ce2a4..d38852e0c6 100644--- a/tests/api/test_product.py+++ b/tests/api/test_product.py@@ -3461,7 +3461,9 @@ NOT_EXISTS_IDS_COLLECTIONS_QUERY = """@pytest.mark.parametrize("product_type_filter", [{"ids": ["fTEJRuFHU6fd2RU=", "2XwnQNNhwCdEjhP="]}],)-def test_product_type_not_exit_ids(product_type_filter, user_api_client, category):+def test_product_types_query_ids_not_exists(+ product_type_filter, user_api_client, category+):query = NOT_EXISTS_IDS_COLLECTIONS_QUERYvariables = {"filter": product_type_filter}response = user_api_client.post_graphql(query, variables)