

def test_form_field_detects_reordering(self):
    form = SortedForm({
        'values': '{a.pk},{b.pk}'.format(a=self.a, b=self.b),
    })
    self.fields['values'].initial = [self.b.pk, self.a.pk]
    self.assertTrue(('values' in form.changed_data))

dataset/ETHPy150Open gregmuellegger/django-sortedm2m/sortedm2m_tests/test_forms.py TestSortedFormField.test_form_field_detects_reordering/VarMisuse@39/57 `form`->`self`