'Checks for no form errors.
Asserts that the response either does not contain a form in its
context, or that if it does, that form has no errors.'

def assertNoFormErrors(self, response, context_name='form'):

    context = getattr(response, 'context', {})
    if ((not context) or (context_name not in context)):
        return True
    errors = response.context[context_name]._errors
    assert (len(errors) == 0), ('Unexpected    errors    were    found    on    the    form:    %s' % errors)
