fix unittests
* tested with Python 2.6, SQLAlchemy 0.6.1, PostgreSQL, MySQL and SQLite
This commit is contained in:
parent
8b0072b3e8
commit
e820261f29
@ -40,7 +40,6 @@ class AlterTableVisitor(SchemaVisitor):
|
|||||||
|
|
||||||
def execute(self):
|
def execute(self):
|
||||||
"""Execute the contents of the SchemaIterator's buffer."""
|
"""Execute the contents of the SchemaIterator's buffer."""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return self.connection.execute(self.buffer.getvalue())
|
return self.connection.execute(self.buffer.getvalue())
|
||||||
finally:
|
finally:
|
||||||
@ -57,7 +56,7 @@ class AlterTableVisitor(SchemaVisitor):
|
|||||||
if ret:
|
if ret:
|
||||||
# adapt to 0.6 which uses a string-returning
|
# adapt to 0.6 which uses a string-returning
|
||||||
# object
|
# object
|
||||||
self.append(ret)
|
self.append(" %s" % ret)
|
||||||
|
|
||||||
def _to_table(self, param):
|
def _to_table(self, param):
|
||||||
"""Returns the table object for the given param object."""
|
"""Returns the table object for the given param object."""
|
||||||
|
@ -520,8 +520,8 @@ class TestShellDatabase(Shell, DB):
|
|||||||
meta = MetaData()
|
meta = MetaData()
|
||||||
tmp_account_rundiffs = Table('tmp_account_rundiffs', meta,
|
tmp_account_rundiffs = Table('tmp_account_rundiffs', meta,
|
||||||
Column('id', Integer(), primary_key=True, nullable=False),
|
Column('id', Integer(), primary_key=True, nullable=False),
|
||||||
Column('login', 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', String(length=None, convert_unicode=False, assert_unicode=None)),
|
Column('passwd', Text(length=None, convert_unicode=False, assert_unicode=None, unicode_error=None, _warn_on_bytestring=False)),
|
||||||
)
|
)
|
||||||
|
|
||||||
def upgrade(migrate_engine):
|
def upgrade(migrate_engine):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user