

def _test_get_db_prep_lookup(self, f):
    self.assertEqual(f.get_db_prep_lookup('exact', True, connection=connection), [True])
    self.assertEqual(f.get_db_prep_lookup('exact', '1', connection=connection), [True])
    self.assertEqual(f.get_db_prep_lookup('exact', 1, connection=connection), [True])
    self.assertEqual(f.get_db_prep_lookup('exact', False, connection=connection), [False])
    self.assertEqual(f.get_db_prep_lookup('exact', '0', connection=connection), [False])
    self.assertEqual(f.get_db_prep_lookup('exact', 0, connection=connection), [False])
    self.assertEqual(f.get_db_prep_lookup('exact', None, connection=connection), [None])

dataset/ETHPy150Open django/django/tests/model_fields/test_booleanfield.py BooleanFieldTests._test_get_db_prep_lookup/original