More Django testing and debugging reference

Posted by: bshaurette | Date: Jul 17, 2008 | Category: Django
I was in unit testing hell today. my big stumbling block is working with the Test Client, using its login() method, to simulate a logged in user. The rest of the views I need to test for rely on the user being authenticated. I'm not going to go through all the variations I tried - I even dug into the Test Client source to see if I could figure out what it wanted that I wasn't already giving it. My conclusion after today: sometimes, the Django documentation lies. It lies, I tell you. Once I have a working piece of test code, I'll post it here. Meanwhile I found a few great testing/debugging references: Debugging Django (slide show by Simon Willison) Debugging Django (the accompanying notes) Add Extra Headers to Test Client Requests [Django Snippets] Django error notification with jabber [Nuno Mariz]