How can I break into a running test with the pdb interactive debugger?
This is the test:
class UserTestCase(TestCase):
  def test_register_should_create_UserProfile(self):
    c = Client()
    response = c.post('/account/register/', {u'username': [u'john'], u'email': [u'[email protected]'], u'bnewaccount': [u'Signup']})
    self.assertEqual(response.status_code, 302)
    import pdb; pdb.set_trace()
    user = User.objects.get( username ='john')
    self.assertTrue(user.get_profile())
When I attempt to run the tests:
$ python manage.py test
The test database is created. The progress dots '.' begin to progress across the screen as the tests pass. Then the progess stops.
I am never shown a pdb> prompt in the terminal window.
How can I get pdb to work properly?