fixture-py/fixture — pull request #2 by martijnvermaat (2013-06-15 20:10:48+00:00)
Title: Support SQLAlchemy declarative model

[Patch taken](https://code.google.com/p/fixture/issues/detail?id=52) from the old issue tracker.

Change SQLAlchemyFixture MappedClassMedium to pass column values to model constructor. This is supported by SQLAlchemy's default constructor and allows us to use declarative model definitions with custom constructor arguments.

Example:

class User(Base)
id = sa.Column(sa.types.Integer, primary_key=True)
name = sa.Column('name', sa.types.Unicode(100))
name2 = sa.Column('name', sa.types.Unicode(100))

def __init__(self, _name):
self.name = _name
self.name2 = "Your %s" % (_name,)

class UserData(DataSet):
class carl_sagan:
name = u'Carl Sagan'