Developer Journal: 15 May 2020
Posted on Fri 15 May 2020 in dev-journal • Tagged with developer journal
Today I wanted to write a function to send me an email when someone registers for conveyor.dev
To do this I wrote the following test:
@patch('routes.send_reg_notification_email')
@patch('stripe.Customer.create')
@patch('stripe.Subscription.create')
def test_notification_email_is_sent(self, mock_sub, mock_cust, mock_email):
mock_cust.return_value = stripe_customer
mock_sub.return_value = stripe_subscription
self …
Continue reading