Summary
In this chapter, you learned about the benefits of automated testing and the capabilities provided by Python's unittest
library. You learned how to isolate units of code by using Mock
and patch()
to replace external modules, classes, and functions. You learned strategies for controlling Tkinter's event queue and simulating user input to automate tests of our GUI components, and wrote both unit tests and integration tests against sections of the ABQ application.
In the next chapter, we'll upgrade our backend to use a relational database. In the process, you'll learn about relational database design and data normalization. You'll also learn to work with the PostgreSQL database server and Python's psycopg2
PostgreSQL interface library.