예제 #1
0
 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
예제 #2
0
def populate_organization_types(types):
    for type in types:
        OrganizationType(type)
예제 #3
0
def _get_organization_type(name):
    return OrganizationType.get_by(label=name)
예제 #4
0
def get_org_type(name):
    return OrganizationType.get_by(label=name)
예제 #5
0
 def _get_organization_type(self, type):
     return OrganizationType.get_by(label=type)
 def _get_organization_type(self, type):
     return OrganizationType.get_by(label=type)