Skip to content

Commit 65d6989

Browse files
committed
Lint & test fixed
1 parent 1881930 commit 65d6989

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

readthedocs/gold/tests/test_webhooks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ class GoldStripeWebhookTests(TestCase):
2323
"client_reference_id": "golduser",
2424
"customer": "cus_a1b2c3",
2525
"customer_email": "[email protected]",
26-
"subscription": "sub_a1b2c3"
26+
"subscription": "sub_a1b2c3",
27+
"mode": "subscription"
2728
}
2829
},
2930
"type": "checkout.session.completed"

readthedocs/gold/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,9 @@ def post(self, request, format=None):
246246
price = event.data.object.amount_total
247247
handle_payment_webhook(username, stripe_customer, stripe_session, price)
248248
except ImportError:
249-
log.warning('Not able to import handle_payment_webhook for one-time donation.')
249+
log.warning(
250+
'Not able to import handle_payment_webhook for one-time donation.',
251+
)
250252
# TODO: add user notification saying it was successful
251253

252254
elif event.type == self.EVENT_CHECKOUT_PAYMENT_FAILED:

0 commit comments

Comments
 (0)