diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-08-14 20:51:37 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-08-14 20:51:37 -0400 |
commit | ff1d504fc4b7df2284b9f261cd03a7568b7038e8 (patch) | |
tree | 6da1e01c17b714aeabeed34cafcf76f7e85524dc /test/orm/inheritance/test_basic.py | |
parent | 8fc50cd3a4eb98501c5ae47ead07c20b485934df (diff) | |
download | sqlalchemy-ff1d504fc4b7df2284b9f261cd03a7568b7038e8.tar.gz |
- 79 chars for expression
- fix typo in test
Diffstat (limited to 'test/orm/inheritance/test_basic.py')
-rw-r--r-- | test/orm/inheritance/test_basic.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/test/orm/inheritance/test_basic.py b/test/orm/inheritance/test_basic.py index 96bb0237b..b4aaf13ba 100644 --- a/test/orm/inheritance/test_basic.py +++ b/test/orm/inheritance/test_basic.py @@ -83,7 +83,7 @@ class PolymorphicOnNotLocalTest(_base.MappedTest): t2 = Table('t2', metadata, Column('id', Integer, primary_key=True), Column('y', String(10)), - Column('xid', ForeignKey('t1.x'))) + Column('xid', ForeignKey('t1.id'))) @testing.resolve_artifact_names def test_bad_polymorphic_on(self): @@ -168,11 +168,13 @@ class PolymorphicSynonymTest(_base.MappedTest): def define_tables(cls, metadata): global t1, t2 t1 = Table('t1', metadata, - Column('id', Integer, primary_key=True, test_needs_autoincrement=True), + Column('id', Integer, primary_key=True, + test_needs_autoincrement=True), Column('type', String(10), nullable=False), Column('info', String(255))) t2 = Table('t2', metadata, - Column('id', Integer, ForeignKey('t1.id'), primary_key=True), + Column('id', Integer, ForeignKey('t1.id'), + primary_key=True), Column('data', String(10), nullable=False)) def test_polymorphic_synonym(self): @@ -185,9 +187,10 @@ class PolymorphicSynonymTest(_base.MappedTest): class T2(T1):pass - mapper(T1, t1, polymorphic_on=t1.c.type, polymorphic_identity='t1', properties={ - 'info':synonym('_info', map_column=True) - }) + mapper(T1, t1, polymorphic_on=t1.c.type, polymorphic_identity='t1', + properties={ + 'info':synonym('_info', map_column=True) + }) mapper(T2, t2, inherits=T1, polymorphic_identity='t2') sess = create_session() at1 = T1(info='at1') |