'A valid formset should have 0 total errors.'

def test_formset_total_error_count(self):

    data = [([(u'Calexico', u'100')], 0), ([(u'Calexico', u'')], 1), ([(u'', u'invalid')], 2), ([(u'Calexico', u'100'), (u'Calexico', u'')], 1), ([(u'Calexico', u''), (u'Calexico', u'')], 2)]
    for (formset_data, expected_error_count) in data:
        formset = self.make_choiceformset(formset_data)
        self.assertEqual(formset.total_error_count(), expected_error_count)
