tailbone/tests/fixtures.py
2013-07-22 19:22:18 -07:00

29 lines
457 B
Python

import fixture
from rattail.db import model
class DepartmentData(fixture.DataSet):
class grocery:
number = 1
name = 'Grocery'
class supplements:
number = 2
name = 'Supplements'
def load_fixtures(engine):
dbfixture = fixture.SQLAlchemyFixture(
env={
'DepartmentData': model.Department,
},
engine=engine)
data = dbfixture.data(DepartmentData)
data.setup()