

def test_regression_12878(self):
    data = {
        'drinks-TOTAL_FORMS': '2',
        'drinks-INITIAL_FORMS': '0',
        'drinks-MAX_NUM_FORMS': '0',
        'drinks-0-name': 'Gin and Tonic',
        'drinks-1-name': 'Gin and Tonic',
    }
    formset = FavoriteDrinksFormSet(data, prefix='drinks')
    self.assertFalse(formset.is_valid())
    self.assertEqual(formset.non_form_errors(), ['You may only specify a drink once.'])

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/tests/regressiontests/forms/tests/formsets.py FormsFormsetTestCase.test_regression_12878/original