From: Chris Withers Date: Mon, 1 Mar 2010 17:59:19 +0000 (+0000) Subject: paranoid test that single table inheritance works with single table inheritance X-Git-Tag: rel_0_6beta2~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83d7d12b0aea14507552bebdbdb78f40b8459e53;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git paranoid test that single table inheritance works with single table inheritance --- diff --git a/test/ext/test_declarative.py b/test/ext/test_declarative.py index d04ed3bfb4..de608e76ae 100644 --- a/test/ext/test_declarative.py +++ b/test/ext/test_declarative.py @@ -1857,6 +1857,23 @@ class DeclarativeMixinTest(DeclarativeTestBase): eq_(MyModel.__table__.kwargs,{'mysql_engine': 'InnoDB'}) + def test_table_args_inherited_single_table_inheritance(self): + + class MyMixin: + __table_args__ = {'mysql_engine':'InnoDB'} + + class General(Base,MyMixin): + __tablename__='test' + id = Column(Integer, primary_key=True) + type_ = Column(String(50)) + __mapper__args = {'polymorphic_on':type_} + + class Specific(General): + __mapper_args__ = {'polymorphic_identity':'specific'} + + eq_(General.__table__.kwargs,{'mysql_engine': 'InnoDB'}) + eq_(Specific.__table__.kwargs,{'mysql_engine': 'InnoDB'}) + def test_table_args_overridden(self): class MyMixin: