On 2/5/07, Lawrence Oluyede <[EMAIL PROTECTED]> wrote: > I tried to set settings.DEBUG to True explicitly in the test case but > nothing has changed. > > How do I get the debug page in the mocked test? Is it possible?
Not really. When you use Django to run a suite of tests, the test runner forces DEBUG=False. This is done to ensure that what is being tested is the behaviour that will be seen live when the site is deployed. The easist immediate workaround I can think of would be to write your own run_tests method - a copy of django.test.simple.run_tests, but with the DEBUG line removed. I will openly admit that debugging Client.get() calls can be a little unwieldy - I'm open to any suggestions on how to improve this area. One suggestion that has been made is to allow exceptions to bubble to the surface. This would effectively expose the contents of the Debug 500 page to the test cases. There is a ticket (#3162) which addresses this concern - this ticket is on my to-do list to address in the nearish future. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---