More tests for join table inheritance

This commit is contained in:
Konsta Vesterinen
2014-01-21 15:01:47 +02:00
parent cf64c416f9
commit c397e74608

View File

@@ -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'