David Talbot
Fri 25 April 2014

Django - testing model methods

I recently stumbled upon a "gotcha" which may help someone else testing Django model methods.

An overview: I recently found myself in a situation where I needed to ensure that the slug field on a model was unique.

A simplification of the model is as follows:

from django.db import ...