Code from book TDD with Python