Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Clean up code
Mateusz Grzybde0e787f4074
diff --git a/saleor/graphql/account/tests/conftest.py b/saleor/graphql/account/tests/conftest.pydeleted file mode 100644index faa63df3e5..0000000000--- a/saleor/graphql/account/tests/conftest.py+++ /dev/null@@ -1,16 +0,0 @@-from typing import List--import pytest--from saleor.payment.interface import CustomerSource---def customer_sources() -> List[CustomerSource]:- return [- CustomerSource(- id=f"CustomerSource:{i}",- gateway="mirumee.payments.dummy",- )- for i in range(5)- ]diff --git a/saleor/graphql/account/tests/test_account.py b/saleor/graphql/account/tests/test_account.pyindex be6dca5a1c..b759dfca4e 100644--- a/saleor/graphql/account/tests/test_account.py+++ b/saleor/graphql/account/tests/test_account.py@@ -1004,45 +1004,6 @@ def test_user_with_cancelled_fulfillments(assert fulfillments[1]["status"] == FulfillmentStatus.CANCELED.upper()-# TODO: fix this!-# @pytest.mark.parametrize(-# "metadata", [{f"key{i}": f"value{i}" for i in range(5)}, {}, None]-# )-# def test_user_with_payment_sources_metadata(-# user_api_client,-# customer_user,-# permission_manage_users,-# metadata,-# ):-# # given-# query = """-# query User($id: ID!) {-# user(id: $id) {-# storedPaymentSources {-# metadata {-# key-# value-# }-# }-# }-# }-# """-# user_id = graphene.Node.to_global_id("User", customer_user.id)-# variables = {"id": user_id}-#-# # when-# user_api_client.user.user_permissions.add(permission_manage_users)-# response = user_api_client.post_graphql(query, variables)-# content = get_graphql_content(response)-#-# # then-# metadata = content["data"]["user"]["storedPaymentSources"][0]["metadata"]-# assert (-# metadata ==-# [{"key": key, "value": value} for key, value in metadata.items()]-# )--ACCOUNT_REGISTER_MUTATION = """mutation RegisterAccount($password: String!,@@ -4545,6 +4506,7 @@ def test_query_staff_members_with_filter_status(permission_manage_staff,staff_user,):+User.objects.bulk_create([User(email="[email protected]", is_staff=True, is_active=False),@@ -4567,6 +4529,7 @@ def test_query_staff_members_app_no_permission(app_api_client,permission_manage_staff,):+User.objects.bulk_create([User(email="[email protected]", is_staff=True, is_active=False),@@ -4846,6 +4809,7 @@ def test_address_query_as_app_with_permission(address_other_country,permission_manage_users,):+variables = {"id": graphene.Node.to_global_id("Address", address_other_country.pk)}response = app_api_client.post_graphql(ADDRESS_QUERY, variables, permissions=[permission_manage_users]diff --git a/saleor/payment/gateways/stripe/tests/test_webhooks.py b/saleor/payment/gateways/stripe/tests/test_webhooks.pyindex 6e9762a1c0..3bc5ead54c 100644--- a/saleor/payment/gateways/stripe/tests/test_webhooks.py+++ b/saleor/payment/gateways/stripe/tests/test_webhooks.py@@ -71,50 +71,6 @@ def test_handle_successful_payment_intent_for_checkout(assert transaction.token == payment_intent.id-# @patch("saleor.payment.gateways.stripe.stripe_api.stripe.PaymentMethod.modify")-# @patch(-# "saleor.payment.gateways.stripe.webhooks.complete_checkout",-# wraps=complete_checkout-# )-# def test_handle_successful_payment_intent_with_future_usage(-# _wrapped_checkout_complete,-# mocked_payment_method_modify,-# payment_stripe_for_checkout,-# checkout_with_items,-# stripe_plugin,-# channel_USD,-# ):-# payment = payment_stripe_for_checkout-# payment.to_confirm = True-# payment.save()-# payment.transactions.create(-# is_success=True,-# action_required=True,-# kind=TransactionKind.ACTION_TO_CONFIRM,-# amount=payment.total,-# currency=payment.currency,-# token="ABC",-# gateway_response={},-# )-# plugin = stripe_plugin()-# payment_intent = StripeObject(id="ABC", last_response={})-# payment_intent["amount_received"] = price_to_minor_unit(-# payment.total, payment.currency-# )-# payment_intent["payment_method"] = "payment_method_id"-# payment_intent["setup_future_usage"] = "off_line"-# payment_intent["currency"] = payment.currency-# payment_intent["status"] = SUCCESS_STATUS-#-# handle_successful_payment_intent(payment_intent, plugin.config, channel_USD.slug)-#-# mocked_payment_method_modify.assert_called_once_with(-# "payment_method_id",-# api_key="secret_key",-# metadata={"channel": channel_USD.slug},-# )--@pytest.mark.parametrize("metadata", [{f"key{i}": f"value{i}" for i in range(5)}, {}, None])