Test-Driven Development in Django

A hands-on series on test-driven development in Django — from first principles to real-world model, view, and API tests.

Stack
Django · pytest · factory_boy

Test-driven development stops being an abstract ideal the moment you apply it to real Django code. This series works through it end to end — first the why and the red-green-refactor loop, then eight worked examples across models, views, and APIs using factory_boy and faker. Read them in order below.

In this case study · 2 posts

  1. 01 What Is Test Driven Development? A Guide to Saner Coding
  2. 02 8 Practical Test Driven Development Examples for Real World Code