From c397e74608e0f062938bab1e6fcddd76ea2f599f Mon Sep 17 00:00:00 2001 From: Konsta Vesterinen Date: Tue, 21 Jan 2014 15:01:47 +0200 Subject: [PATCH] More tests for join table inheritance --- tests/aggregate/test_join_table_inheritance.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/aggregate/test_join_table_inheritance.py b/tests/aggregate/test_join_table_inheritance.py index 635c543..a6e5041 100644 --- a/tests/aggregate/test_join_table_inheritance.py +++ b/tests/aggregate/test_join_table_inheritance.py @@ -53,8 +53,17 @@ class TestLazyEvaluatedSelectExpressionsForAggregates(TestCase): catalog_id = sa.Column(sa.Integer, sa.ForeignKey('catalog.id')) self.Catalog = Catalog + self.CostumeCatalog = CostumeCatalog + self.CarCatalog = CarCatalog self.Product = Product + def test_columns_inherited_from_parent(self): + assert self.CarCatalog.net_worth + assert self.CostumeCatalog.net_worth + assert self.Catalog.net_worth + assert not hasattr(self.CarCatalog.__table__.c, 'net_worth') + assert not hasattr(self.CostumeCatalog.__table__.c, 'net_worth') + def test_assigns_aggregates_on_insert(self): catalog = self.Catalog( name=u'Some catalog'