Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix tests

Pacu2834b6946fcce
diff --git a/saleor/checkout/utils.py b/saleor/checkout/utils.py
index 6d288c1fcb..b0b0bfafef 100644
--- a/saleor/checkout/utils.py
+++ b/saleor/checkout/utils.py
@@ -889,8 +889,8 @@ def is_fully_paid(cart: Cart):
# FIXME test me
payments = cart.payments.filter(is_active=True)
total_paid = sum(
- [p.get_total() for p in payments])
- return total_paid >= cart.get_total().gross
+ [p.total for p in payments])
+ return total_paid >= cart.get_total().gross.amount
def ready_to_place_order(cart: Cart, taxes, discounts):
diff --git a/tests/gateway/test_braintree.py b/tests/gateway/test_braintree.py
index b26776caec..5e3aed629b 100644
--- a/tests/gateway/test_braintree.py
+++ b/tests/gateway/test_braintree.py
@@ -493,7 +493,6 @@ def test_braintree_payment_form(settings, payment_dummy):
data=data, payment=payment, gateway=payment_gateway,
gateway_params=gateway_params)
assert form.is_valid()
- form.process_payment()
def test_get_form_class(settings):
diff --git a/tests/settings.py b/tests/settings.py
index a7ca66209c..b00fd87267 100644
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -17,3 +17,8 @@ if 'sqlite' in DATABASES['default']['ENGINE']: # noqa
'SERIALIZE': False,
'NAME': ':memory:',
'MIRROR': None}
+
+CHECKOUT_PAYMENT_GATEWAYS = {
+ DUMMY: 'Dummy gateway',
+ BRAINTREE: 'Braintree'
+}