title: Writing test cases for django models
body: <p>Half way through my current project, after suffering the pain of spending uncountable minutes on debugging, I have decided to adopt TDD. To start, I am planning to write a set of unit tests for each existing models. But for models that only have attributes defined (ie. no additional methods/properties) I am not sure what I need to test nor how. </p>
  
  <pre><code>class Product(models.Model):
      name = models.CharField(max_length=50)
      description = models.TextField(default='', blank=True)
      retails = models.ManyToManyField(Retail, verbose_name='Retail stores that carry the product')
      manufacturer = models.ForeignKey(Manufacturer, related_name='products')
      date_created = models.DateTimeField(auto_now_add=True)
      date_modified = models.DateTimeField(auto_now=True)
  </code></pre>
  
  <p>Using <em>Product</em> as an example, what are the things about it that unit tests should cover? And how should <em>ForeignKey</em> and <em>ManyToManyField</em> be covered?</p>