users = Table('query_users', metadata,
Column('user_id', INT, primary_key = True),
Column('user_name', VARCHAR(20)),
+ mysql_engine='InnoDB'
)
users.create(testbase.db)
assert len(result.fetchall()) == 3
transaction.commit()
- @testbase.unsupported('mysql')
def testrollback(self):
"""test a basic rollback"""
connection = testbase.db.connect()
assert len(result.fetchall()) == 0
connection.close()
- @testbase.unsupported('mysql')
def testnestedrollback(self):
connection = testbase.db.connect()
connection.close()
- @testbase.unsupported('mysql')
def testnesting(self):
connection = testbase.db.connect()
transaction = connection.begin()
users = Table('query_users', metadata,
Column('user_id', INT, primary_key = True),
Column('user_name', VARCHAR(20)),
+ mysql_engine='InnoDB'
)
users.create(tlengine)
def tearDown(self):
users.drop(tlengine)
tlengine.dispose()
- @testbase.unsupported('mysql')
def testrollback(self):
"""test a basic rollback"""
tlengine.begin()
finally:
external_connection.close()
- @testbase.unsupported('mysql')
def testcommit(self):
"""test a basic commit"""
tlengine.begin()
assert len(result.fetchall()) == 3
transaction.commit()
- @testbase.unsupported('mysql')
def testrollback_off_conn(self):
# test that a TLTransaction opened off a TLConnection allows that
# TLConnection to be aware of the transactional context
finally:
external_connection.close()
- @testbase.unsupported('mysql')
def testmorerollback_off_conn(self):
# test that an existing TLConnection automatically takes place in a TLTransaction
# opened on a second TLConnection
finally:
external_connection.close()
- @testbase.unsupported('mysql')
def testcommit_off_conn(self):
conn = tlengine.contextual_connect()
trans = conn.begin()
finally:
external_connection.close()
- @testbase.unsupported('mysql', 'sqlite')
+ @testbase.unsupported('sqlite')
def testnesting(self):
"""tests nesting of tranacstions"""
external_connection = tlengine.connect()
finally:
external_connection.close()
- @testbase.unsupported('mysql')
def testmixednesting(self):
"""tests nesting of transactions off the TLEngine directly inside of
tranasctions off the connection from the TLEngine"""
finally:
external_connection.close()
- @testbase.unsupported('mysql')
def testmoremixednesting(self):
"""tests nesting of transactions off the connection from the TLEngine
inside of tranasctions off thbe TLEngine directly."""