Django TestCase: Inspecting Errors

I use PyCharm for all my Django projects. With PyCharm it is easy to set break points and inspect variables, although sometimes it is difficult to know what variables to look at. This is the case when trying to figure out form errors when running Django TestCase.

If the variable “response” contains the values returned by a post, then errors are at:

response.context_data['my_form'].errors

where errors is a dict.