

def test_transactions(cls):
    cls.app.preprocess_request()
    with rec_position.client.connection():
        cluster_id = 3
        rec = {
            'accommodation': 'mountain hut',
            'work': 'not!',
            'holiday': 'lake',
        }
        rec_position = cls.client.record_create(cluster_id, rec)
        tx = cls.client.tx_commit()
        tx.begin()
        rec1 = {
            'accommodation': 'home',
            'work': 'some work',
            'holiday': 'surf',
        }
        rec_position1 = cls.client.record_create((- 1), rec1)
        rec2 = {
            'accommodation': 'hotel',
            'work': 'office',
            'holiday': 'mountain',
        }
        update_record = cls.client.record_update(cluster_id, rec_position._rid, rec2, rec_position._version)
        tx.attach(rec_position1)
        tx.attach(rec_position1)
        y = tx.attach(update_record)
        res = tx.commit()

dataset/ETHPy150Open calthoff/flask-orientdb/test_flask_orientdb.py FlaskOrientDBTests.test_transactions/VarMisuse@19/22 `cls`->`rec_position`