Testing in Django

I’ve been working with a team of developers on the BOS2 project, a new version of our successful Bristol Online Surveys (BOS) service. This completely new codebase is written from the ground up using a variety of tools and technologies many of  which are new to the developers on the project. For myself, I’ve not had any experience of Cassandra before, and aside from some light-touch Plone work in the past this is my first real Python (Django) project that I’ve worked on.

While I’m enjoying the experience, with a background in Java I’ve come to rely on an excellent testing ecosystem which is one of the areas where I feel Django falls short. It’s not that you can’t do what you want with the Django testing framework but (as this blog post shows) it makes you work harder to get there and it’s often easy to fall into traps as you build your tests. I don’t feel we’ve achieved nirvana with our test framework but we’re getting there. Continue reading