1

In my Django application, I am using the Amazon boto email service for sending messages to my clients. I am doing the testing of view function which will send the email.

Now I am getting confused about how to test the boto service. How to set up a virtual email inbox to get test the email service. Or should I test the boto service?

2

One of the common ways to unit test the code that uses boto client, aside from "manual" mocking and patching, is to use the moto library which provides a drop-in replacement for the boto client specifically for the use in testing.

I don't think you need to set up a virtual inbox, just check that the notification was sent with moto.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.