tl;dr When writing tests, mock out a subsystem if and only if it’s prohibitive to test against the real thing. !tl;dr Our product uses Redis. It’s an awesome technology. We’ve avoided needing Redis in our unit tests. But when I added a product feature that made deep use of Redis, I wrote its unit tests to use it, and changed our development fabfile to instantiate a test Redis server when running t
![Replacing Redis with a Python Mock](https://cdn-ak-scissors.b.st-hatena.com/image/square/8d71ff5111e05619a10d29bb40d7aebaa75c8fbc/height=288;version=1;width=512/https%3A%2F%2Fs0.wp.com%2Fi%2Fblank.jpg)