def project2(dbsession, company2, customer2): from autonomie.models.project import Project project = Project(name=u"Project 2") project.company = company2 project.customers = [customer2] dbsession.add(project) dbsession.flush() return project
def project(dbsession, company, customer, project_type): from autonomie.models.project import Project project = Project(name=u"Project", project_type=project_type) project.company = company project.customers = [customer] dbsession.add(project) dbsession.flush() return project
def project2(dbsession, company2, customer2, project_type): from autonomie.models.project import Project project = Project(name=u"Project 2", project_type=project_type) project.company = company2 project.customers = [customer2] dbsession.add(project) dbsession.flush() return project
def func( name=u'Project', company=company, customers=[customer], project_type=project_type ): if not hasattr(customers, '__iter__'): customers = [customers] project = Project(name=u"Project", project_type=project_type) project.company = company project.customers = customers dbsession.add(project) dbsession.flush() return project
def func(name=u'Project', company=company, customers=[customer], project_type=project_type): if not hasattr(customers, '__iter__'): customers = [customers] project = Project(name=u"Project", project_type=project_type) project.company = company project.customers = customers dbsession.add(project) dbsession.flush() return project