From: Mike Bayer Date: Thu, 11 Mar 2010 18:01:04 +0000 (+0000) Subject: - fix the sqlalchemy.test.schema.Column function to work with copies X-Git-Tag: rel_0_6beta2~57^2~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=67f5f4831b383b3c9791e3a89fca522b9ce64472;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - fix the sqlalchemy.test.schema.Column function to work with copies - add sequences to new associationproxy tests - test/ext passes 100% on oracle here --- diff --git a/lib/sqlalchemy/test/schema.py b/lib/sqlalchemy/test/schema.py index 8f1df8734e..d33d75e2c4 100644 --- a/lib/sqlalchemy/test/schema.py +++ b/lib/sqlalchemy/test/schema.py @@ -65,8 +65,8 @@ def Column(*args, **kw): kw.get('primary_key', False) and \ testing.against('firebird', 'oracle'): def add_seq(tbl, c): - col._init_items( - schema.Sequence(_truncate_name(testing.db.dialect, tbl.name + '_' + col.name + '_seq'), optional=True) + c._init_items( + schema.Sequence(_truncate_name(testing.db.dialect, tbl.name + '_' + c.name + '_seq'), optional=True) ) col._on_table_attach(add_seq) return col @@ -76,4 +76,4 @@ def _truncate_name(dialect, name): return name[0:max(dialect.max_identifier_length - 6, 0)] + "_" + hex(hash(name) % 64)[2:] else: return name - \ No newline at end of file + diff --git a/test/ext/test_associationproxy.py b/test/ext/test_associationproxy.py index 81183d14a4..38a75814bf 100644 --- a/test/ext/test_associationproxy.py +++ b/test/ext/test_associationproxy.py @@ -1017,12 +1017,12 @@ class ComparatorTest(_base.MappedTest): Table( 'users', metadata, - Column('id', Integer, primary_key=True), + Column('id', Integer, primary_key=True, test_needs_autoincrement=True), Column('name', String(64))) Table( 'keywords', metadata, - Column('id', Integer, primary_key=True), + Column('id', Integer, primary_key=True, test_needs_autoincrement=True), Column('keyword', String(64))) @classmethod