class documentation

class _AssertFormErrorDeprecationHelper: (source)

View In Hierarchy

Undocumented

Class Method patch_signature Replace the decorated method with a new one that inspects the passed args/kwargs and dispatch to the old implementation (with deprecation warning) when it detects the old signature.
Static Method assertFormError Search through all the rendered contexts of the `response` for a form named `form` then dispatch to the new assertFormError() using that instance. If multiple contexts contain the form, they're all checked in order and any failure will abort (this matches the old behavior).
Static Method assertFormsetError Search for a formset named "formset" in the "response" and dispatch to the new assertFormsetError() using that instance. If the name is found in multiple contexts they're all checked in order and any failure will abort the test.
@classmethod
def patch_signature(cls, new_method): (source)

Replace the decorated method with a new one that inspects the passed args/kwargs and dispatch to the old implementation (with deprecation warning) when it detects the old signature.

@staticmethod
def assertFormError(self, response, form, field, errors, msg_prefix=''): (source)

Search through all the rendered contexts of the `response` for a form named `form` then dispatch to the new assertFormError() using that instance. If multiple contexts contain the form, they're all checked in order and any failure will abort (this matches the old behavior).

@staticmethod
def assertFormsetError(self, response, formset, form_index, field, errors, msg_prefix=''): (source)

Search for a formset named "formset" in the "response" and dispatch to the new assertFormsetError() using that instance. If the name is found in multiple contexts they're all checked in order and any failure will abort the test.