Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Minor fixes
Jakub Draganekef098e9b4f78
diff --git a/saleor/payment/gateway.py b/saleor/payment/gateway.pyindex 89ef2297e7..267ee20818 100644--- a/saleor/payment/gateway.py+++ b/saleor/payment/gateway.py@@ -7,7 +7,12 @@ from ..extensions.manager import get_extensions_managerfrom . import GatewayError, TransactionKindfrom .models import Payment, Transaction-from .utils import create_payment_information, create_transaction, validate_gateway_response, _gateway_postprocess+from .utils import (+ create_payment_information,+ create_transaction,+ validate_gateway_response,+ _gateway_postprocess,+)logger = logging.getLogger(__name__)@@ -49,7 +54,6 @@ def _get_gateway(payment: Payment) -> Gateway:try:gateway = Gateway(payment.gateway)except AttributeError:- raise ImproperlyConfigured(- "Payment gateway %s is not configured." % gateway)+ raise ImproperlyConfigured("Payment gateway %s is not configured." % gateway)return gatewaydiff --git a/saleor/payment/gateways/dummy/plugin.py b/saleor/payment/gateways/dummy/plugin.pyindex c9562af058..97b4324bb7 100644--- a/saleor/payment/gateways/dummy/plugin.py+++ b/saleor/payment/gateways/dummy/plugin.py@@ -15,7 +15,6 @@ if TYPE_CHECKING:class DummyGatewayPlugin(BasePlugin):- #PLUGIN_NAME = "DUMMY_GATEWAY"PLUGIN_NAME = GATEWAY_NAMECONFIG_STRUCTURE = {"Store customers card": {diff --git a/tests/conftest.py b/tests/conftest.pyindex 73f74b2fb9..535f5a6424 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -80,7 +80,6 @@ def site_settings(db, settings):return obj-@pytest.fixturedef checkout(db):return Checkout.objects.create()diff --git a/tests/gateway/test_gateway.py b/tests/gateway/test_gateway.pyindex aab3f05b6d..2daa482635 100644--- a/tests/gateway/test_gateway.py+++ b/tests/gateway/test_gateway.py@@ -51,9 +51,7 @@ def test_process_payment(gateway, payment_txn_preauth):)gateway.plugin_manager.process_payment.return_value = PROCESS_PAYMENT_RESPONSE- transaction = gateway.process_payment(- payment=payment_txn_preauth, token=TOKEN- )+ transaction = gateway.process_payment(payment=payment_txn_preauth, token=TOKEN)gateway.plugin_manager.process_payment.assert_called_once_with(USED_GATEWAY, PAYMENT_DATA@@ -71,9 +69,7 @@ def test_store_source_when_processing_payment(gateway, payment_txn_preauth):gateway.plugin_manager.process_payment.return_value = PROCESS_PAYMENT_RESPONSEtransaction = gateway.process_payment(- payment=payment_txn_preauth,- token=TOKEN,- store_source=True,+ payment=payment_txn_preauth, token=TOKEN, store_source=True)gateway.plugin_manager.process_payment.assert_called_once_with(