def create_user(self): user = create_user( uid=u'jcdusse', firstname=u'Jean-Claude', lastname=u'Dusse', email=u'jean-claude.dusse@localhost', work_phone=u'0212345678', mobile_phone=u'0612345678', position=u'Bronzé', corporation=OrganizationData(label=u'PagesJaunes', type=OrganizationType(u'Corporation')), direction=OrganizationData(label=u'Dir. Communication', type=OrganizationType(u'Direction')), service=OrganizationData(label=u'Direction de la Communication', type=OrganizationType(u'Service')), site=OrganizationData(label=u'Sèvres', type=OrganizationType(u'Site')), ) user.photo = self.create_photo() session.flush() return user
def populate_organization_types(types): for type in types: OrganizationType(type)
def _get_organization_type(name): return OrganizationType.get_by(label=name)
def get_org_type(name): return OrganizationType.get_by(label=name)
def _get_organization_type(self, type): return OrganizationType.get_by(label=type)