def test_close2(self, local_connection):
    connection = local_connection
    users = self.tables.users
    transaction = connection.begin()
    connection.execute(users.insert(), user_id=1, user_name='user1')
    connection.execute(users.insert(), user_id=2, user_name='user2')
    connection.execute(users.insert(), user_id=3, user_name='user3')
    assert connection.in_transaction()
    transaction.close()
    assert (not connection.in_transaction())
    result = connection.exec_driver_sql('select * from users')
    assert (len(result.fetchall()) == 0)
def test_close2(self, local_connection):
    connection = local_connection
    users = self.tables.users
    transaction = connection.begin()
    connection.execute(users.insert(), user_id=1, user_name='user1')
    connection.execute(users.insert(), user_id=2, user_name='user2')
    connection.execute(users.insert(), user_id=3, user_name='user3')
    assert connection.in_transaction()
    transaction.close()
    assert (not connection.in_transaction())
    result = connection.exec_driver_sql('select * from users')
    assert (len(result.fetchall()) == 0)