title: How to debug failing tests in Django?
body: <p>How do I debug my tests? For example, I POST to create an entry and expect it to validate and return a particular page. It works in the browser and in the shell, but the test is the only thing that fails (ironically!). I would like to print the response to the console or something so I could read errors or what have you. But I can only see things that I <code>print</code> in e.g. the view.</p>
  
  <p>Not sure it's necessary, but here's the test code in question from <code>tests.py</code>:</p>
  
  <pre><code>    resp = self.client.post('/meal/invite/', 
          {'summary': 'Test munch', 'when': now(), 'max_diners': '1', 'description': 'Munchies'}, follow=True)
      self.assertEqual(resp.status_code, 200)
      self.assertContains(resp, 'Test munch', 1)
      self.assertContains(resp, 'You are hosting this meal', 1)
  </code></pre>
  
  <p>The final assertion is incorrect. If I change it to a value present in the original form page showing 'field required' errors, it passes. I just can't see what I'm missing.</p>
  
  <p>I have a few other tests working, but I just don't know how to debug this.</p>
  
  <p>How is it done?</p>