'Test to ensure that we don\'t translate boolean objects to String unnecessarily in filter clauses
@since 3.6
@jira_ticket PYTHON-596
@expected_result We should not receive a server error
@test_category object_mapper'

@execute_count(3)
def test_bool_filter(self):

    class bool_model2(Model, ):
        k = columns.Boolean(primary_key=True)
        b = columns.Integer(primary_key=True)
        v = columns.Text()
    drop_table(bool_model2)
    sync_table(bool_model2)
    bool_model2.create(k=True, b=1, v='a')
    bool_model2.create(k=False, b=1, v='b')
    self.assertEqual(len(list(bool_model2.objects(k__in=(True, False)))), 2)
