Some random code from the "Test-Driven Web Development with Python" (http://chimera.labs.oreilly.com/books/1234000000754/index.html)