From 83d7d12b0aea14507552bebdbdb78f40b8459e53 Mon Sep 17 00:00:00 2001 From: Chris Withers Date: Mon, 1 Mar 2010 17:59:19 +0000 Subject: [PATCH] paranoid test that single table inheritance works with single table inheritance --- test/ext/test_declarative.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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: -- 2.47.3