fix unittests

* tested with Python 2.6, SQLAlchemy 0.6.1, PostgreSQL, MySQL and SQLite
This commit is contained in:
Jan Dittberner 2010-07-04 12:33:28 +02:00
parent 8b0072b3e8
commit e820261f29
2 changed files with 3 additions and 4 deletions

View File

@ -40,7 +40,6 @@ class AlterTableVisitor(SchemaVisitor):
def execute(self):
"""Execute the contents of the SchemaIterator's buffer."""
try:
return self.connection.execute(self.buffer.getvalue())
finally:
@ -57,7 +56,7 @@ class AlterTableVisitor(SchemaVisitor):
if ret:
# adapt to 0.6 which uses a string-returning
# object
self.append(ret)
self.append(" %s" % ret)
def _to_table(self, param):
"""Returns the table object for the given param object."""

View File

@ -520,8 +520,8 @@ class TestShellDatabase(Shell, DB):
meta = MetaData()
tmp_account_rundiffs = Table('tmp_account_rundiffs', meta,
Column('id', Integer(), primary_key=True, nullable=False),
Column('login', String(length=None, convert_unicode=False, assert_unicode=None)),
Column('passwd', String(length=None, convert_unicode=False, assert_unicode=None)),
Column('login', Text(length=None, convert_unicode=False, assert_unicode=None, unicode_error=None, _warn_on_bytestring=False)),
Column('passwd', Text(length=None, convert_unicode=False, assert_unicode=None, unicode_error=None, _warn_on_bytestring=False)),
)
def upgrade(migrate_engine):