Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Serverless Microservices in Python

You're reading from   Building Serverless Microservices in Python A complete guide to building, testing, and deploying microservices using serverless computing on AWS

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher Packt
ISBN-13 9781789535297
Length 168 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Richard Takashi Freeman Richard Takashi Freeman
Author Profile Icon Richard Takashi Freeman
Richard Takashi Freeman
Arrow right icon
View More author details
Toc

Table of Contents (8) Chapters Close

Preface 1. Serverless Microservices Architectures and Patterns FREE CHAPTER 2. Creating Your First Serverless Data API 3. Deploying Your Serverless Stack 4. Testing Your Serverless Microservice 5. Securing Your Microservice 6. Summary and Future Work 7. Other Books You May Enjoy

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image