Integration testing with databases is one of the most vital, yet commonly overlooked part of any software development process. This is, in part, due to the need to have a reachable database server active around somewhere. In this article, we explore unit and integration testing with databases that can be repeatedly spun up for testing, provides a uniform schema and test data, and can be easily torn down afterwards. All these can be done with the help of some nifty open source Python libraries that are readily available.

A Little Bit on Pytest

pytest is the current de facto testing framework for any Python application…


This is the first of a series of articles I will set out to write in 2020 highlighting different design patterns and principles being applied in my own projects.

The Factory method is one of the Gang of Four design patterns that is commonly used for creating objects. In this pattern, the method of the Factory class that is involved in the creation of objects typically has switch statements (or if/else blocks in the case of Python) in which, depending on the value of a string (denoting the type of object to be created) being passed in, will create the…

Geoffrey Koh

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store