'Regression test for #14786 -- Test that field values are not prepared
twice in get_db_prep_lookup().'

def test_14786(self):

    prepare_count = [0]
    class NoopField(models.TextField, ):
        def get_prep_value(self, value):
            prepare_count[0] += 1
            return super(NoopField, self).get_prep_value(value)
    field = NoopField()
    field.get_db_prep_lookup(u'exact', u'TEST', connection=connection, prepared=False)
    self.assertEqual(prepare_count[0], 1)
