def setUp(test): print "\n---------- SETUP ----------", test placelesssetup.setUp() xmlconfig.string(zcml_slug) metadata.create_all(checkfirst=True) # placelesssetup.tearDown() clears the registry print "\n---------- register_generic_workflow_adapters -------------", test adapters.register_generic_workflow_adapters()
def setUp(test): print "\n---------- SETUP ----------", test placelesssetup.setUp() xmlconfig.string(zcml_slug) metadata.create_all(checkfirst=True)
def setUp(test): placelesssetup.setUp() xmlconfig.string(zcml_slug) metadata.create_all(checkfirst=True) # placelesssetup.tearDown() clears the registry adapters.register_workflow_adapters()
#!+ TODO(miano, 26-Oct-2010) : Hypothetical case where the editors and readers # get equal time allocations as reporters takes = rdb.Table( "takes", metadata, rdb.Column("take_id", rdb.Integer, primary_key=True), rdb.Column("start_date", rdb.DateTime(timezone=False), nullable=False), rdb.Column("end_date", rdb.DateTime(timezone=False), nullable=False), rdb.Column("editor_id", rdb.Integer, rdb.ForeignKey("users.user_id"), nullable=False), rdb.Column("reader_id", rdb.Integer, rdb.ForeignKey("users.user_id"), nullable=False), rdb.Column("reporter_id", rdb.Integer, rdb.ForeignKey("users.user_id"), nullable=False), rdb.Column("group_sitting_id", rdb.Integer, rdb.ForeignKey("group_sittings.group_sitting_id"), nullable=False), ) assignments = rdb.Table( "assignments", metadata, rdb.Column( "group_sitting_id./bn", rdb.Integer, rdb.ForeignKey("group_sittings.group_sitting_id"), primary_key=True ), rdb.Column("staff_id", rdb.Integer, rdb.ForeignKey("users.user_id"), primary_key=True), ) if __name__ == "__main__": from sqlalchemy import create_engine engine = create_engine("postgres://localhost/bungeni", echo=False) metadata.reflect(bind=engine) metadata.bind = engine metadata.create_all()
"group_sitting_id", rdb.Integer, rdb.ForeignKey("group_sittings.group_sitting_id"), nullable=False, ), ) assignments = rdb.Table( "assignments", metadata, rdb.Column( 'group_sitting_id./bn', rdb.Integer, rdb.ForeignKey("group_sittings.group_sitting_id"), primary_key=True, ), rdb.Column( 'staff_id', rdb.Integer, rdb.ForeignKey("users.user_id"), primary_key=True, ), ) if __name__ == '__main__': from sqlalchemy import create_engine engine = create_engine("postgres://localhost/bungeni", echo=False) metadata.reflect(bind=engine) metadata.bind = engine metadata.create_all()