"Do you know why the Django mascot is a pony? The story is that Django comes with so many things you want: an ORM, all sorts of middleware, the admin site … "What else do you want, a pony?" Well, Gunicorn stands for "Green Unicorn", which I guess is what you’d want next if you already had a pony…"
"On the Pros and Cons of Different Types of Test, and Decoupling ORM code Functional tests Provide the best guarantee that your application really works correctly, from the point of view of the user. But: it’s a slower feedback cycle, And they don’t necessarily help you write clean code. Integrated t"
"So one way of getting what we want is to try and minimise the amount of our code that has to deal with boundaries. Then we test our core business logic with isolated tests and test our integration points with integrated tests."
"Functional tests should help you build an application with the right functionality, and guarantee you never accidentally break it. Unit tests should help you to write code that’s clean and bug free."
"We can start to settle into the TDD unit-test/code cycle now: 1. In the terminal, run the unit tests and see how they fail. 2. In the editor, make a minimal code change to address the current test failure. And repeat!"
"Kent Beck (who basically invented TDD) uses the metaphor of lifting a bucket of water out of a well with a rope: when the well isn’t too deep, and the bucket isn’t very full, it’s easy. And even lifting a full bucket is pretty easy at first. But after a while, you’re going to get tired. TDD is like "
"In general, one of the rules of unit testing is Don’t test constants, and testing HTML as text is a lot like testing a constant."
"Good unit testing practice says that each test should only test one thing. The reason is that it makes it easier to track down bugs. Having multiple assertions in a test means that, if the test fails on an early assertion, you don’t know what the status of the later assertions is."