Unit testing your Python Lambda code
In this section, we are going to look at why testing is important, as well as the sample data we can use for testing, unit testing, and mocking.
Why is testing important?
Think about the collaboration and teamwork taking place in large, distributed teams of developers in different countries, and imagine they want to collaborate on the same source code repository and check code changes at different times. It's very important for these teams to understand the code and be able to test it locally to see how it works, whether their changes will impact existing services, and whether the code is still working as expected.
Testing is important to ensure we have quality in the delivery or user experience. By having lots of tests, you can identify defects early and fix them. For example, if there are major bugs detected, you could decide not to release the recent update and fix the issues before doing the release.
Another major point is usability. For example, your...