summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Dittberner <jan.dittberner@googlemail.com>2010-07-04 12:33:28 +0200
committerJan Dittberner <jan.dittberner@googlemail.com>2010-07-04 12:33:28 +0200
commite820261f2959f736c5b4ec5a0658ab712d46e192 (patch)
treeb3d16f890a7f47e4bce15b58b791011be219ea12
parent8b0072b3e80ec804fa66efde7feb4bf735b85e28 (diff)
downloadsqlalchemy-migrate-e820261f2959f736c5b4ec5a0658ab712d46e192.tar.gz
fix unittests
* tested with Python 2.6, SQLAlchemy 0.6.1, PostgreSQL, MySQL and SQLite
-rw-r--r--migrate/changeset/ansisql.py3
-rw-r--r--migrate/tests/versioning/test_shell.py4
2 files changed, 3 insertions, 4 deletions
diff --git a/migrate/changeset/ansisql.py b/migrate/changeset/ansisql.py
index 69c90e9..a608260 100644
--- a/migrate/changeset/ansisql.py
+++ b/migrate/changeset/ansisql.py
@@ -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."""
diff --git a/migrate/tests/versioning/test_shell.py b/migrate/tests/versioning/test_shell.py
index 8727626..8aba92b 100644
--- a/migrate/tests/versioning/test_shell.py
+++ b/migrate/tests/versioning/test_shell.py
@@ -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):