~ubuntu-branches/debian/jessie/sqlalchemy/jessie

« back to all changes in this revision

Viewing changes to test/orm/inheritance/test_productspec.py

  • Committer: Bazaar Package Importer
  • Author(s): Piotr Ożarowski
  • Date: 2011-08-01 23:18:16 UTC
  • mfrom: (1.4.15 upstream) (16.1.14 experimental)
  • Revision ID: james.westby@ubuntu.com-20110801231816-6lx797pi3q1fpqst
Tags: 0.7.2-1
* New upstream release
* Bump minimum required python-mako version to 0.4.1 (closes: 635898)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
from sqlalchemy import *
3
3
from sqlalchemy.orm import *
4
4
 
5
 
from sqlalchemy.test import testing
6
 
from test.orm import _base
7
 
from sqlalchemy.test.schema import Table, Column
 
5
from test.lib import testing
 
6
from test.lib import fixtures
 
7
from test.lib.schema import Table, Column
8
8
 
9
 
class InheritTest(_base.MappedTest):
 
9
class InheritTest(fixtures.MappedTest):
10
10
    """tests some various inheritance round trips involving a particular set of polymorphic inheritance relationships"""
11
11
    @classmethod
12
12
    def define_tables(cls, metadata):
213
213
    def testfour(self):
214
214
        """this tests the RasterDocument being attached to the Assembly, but *not* the Document.  this means only
215
215
        a "sub-class" task, i.e. corresponding to an inheriting mapper but not the base mapper, is created. """
 
216
 
216
217
        product_mapper = mapper(Product, products_table,
217
218
            polymorphic_on=products_table.c.product_type,
218
219
            polymorphic_identity='product')