There are a couple changes to the tinydb api that we have to watch out for. I recommend you pin tinydb to 3.15.1 for the book. See Python Testing with pytest: tinydb needs pinned to 3.15.1 (code download)