Created: 17 Dec 2006
Grig Gheorghiu explains testing with stub and mock objects in Python. He explains how we can use namespaces to replace objects with mocked implementations for unit testing purposes.
I’m not entirely sure that namespaces completely remove the need for runtime dependency injection, but since I’d completely missed the point of them until now, I thought I’d share the link.