'Test that ModelMultipleChoiceField does O(1) queries instead of
O(n) (#10156).'

def test_model_multiple_choice_number_of_queries(self):

    for i in range(30):
        Person.objects.create(name=('Person    %s' % i))
    db.reset_queries()
    f = forms.ModelMultipleChoiceField(queryset=Person.objects.all())
    selected = f.clean([1, 3, 5, 7, 9])
    self.assertEquals(len(db.connection.queries), 1)
