pass
else:
self.transaction = self.transaction.rollback()
- attribute_manager.rollback(*self.identity_map.values())
+ # TODO: we can rollback attribute values. however
+ # we would want to expand attributes.py to be able to save *two* rollback points, one to the
+ # last flush() and the other to when the object first entered the transaction.
+ # [ticket:705]
+ #attribute_manager.rollback(*self.identity_map.values())
if self.transaction is None and self.transactional:
self.begin()
post_configure['require'] = _require
def _create_testing_engine(options, file_config):
- from sqlalchemy import engine
+ from sqlalchemy import engine, schema
global db, db_type
engine_opts = {}
if options.serverside:
db = engine.create_engine(db_uri, **engine_opts)
db_type = db.name
+ print "Dropping existing tables in database: " + db_uri
+ md = schema.MetaData(db, reflect=True)
+ md.drop_all()
+
# decorate the dialect's create_execution_context() method
# to produce a wrapper
from testlib.testing import ExecutionContextWrapper