How do you find what Django name's a form within its context, so that you can assert tests on the form?
I have a simple unittest like:
def test_stuff(self):
client = Client()
response = client.post('/admin/app/model/add', {'name': 'Some Name'}
self.assertFormError(response, 'what is this?!?!?', 'name', 'This name already exists')
Django's unittest framework provides methods to specifically test form fields...but they all require a form name. However, when testing admin views, these are auto-generated, so I don't know them, much less can I hard-code them inside a unittest.
How do I find this name? Attempting to print response.context shows an enormous amount of data, so I'm not sure where to start.