'An assertion is raised if the formsets non-form errors doesn\'t contain the provided error.'

def test_unknown_nonform_error(self):

    for (prefix, kwargs) in self.msg_prefixes:
        with self.assertRaises(AssertionError) as cm:
            self.assertFormsetError(self.response_nonform_errors, u'my_formset', None, None, u'Some    error.', **kwargs)
        self.assertIn(str_prefix((prefix + u"The    formset    'my_formset'    in    context    0    does    not    contain    the    non-form    error    'Some    error.'    (actual    errors:    [%(_)s'Forms    in    a    set    must    have    distinct    email    addresses.'])")), str(cm.exception))
