For example in lesson/test/test_views test_lesson_edit_page_validation_errors_sent_to_template(self): it would be nice to check that error messages are in the response.context.
AssertFormsetError should do it but I can't quite figure the syntax.
self.assertFormsetError(
response,
AttachmentInlineFormset,
AttachmentInlineFormset.form.base_fields['name'],
0,
LESSON_NAME_FIELD_REQUIRED_ERROR,
)
http://saravanan.co.uk/topics/testing/tools.html
For example in lesson/test/test_views test_lesson_edit_page_validation_errors_sent_to_template(self): it would be nice to check that error messages are in the response.context.
AssertFormsetError should do it but I can't quite figure the syntax. self.assertFormsetError( response, AttachmentInlineFormset, AttachmentInlineFormset.form.base_fields['name'], 0, LESSON_NAME_FIELD_REQUIRED_ERROR, )