def add_group(group_name, group_de):
    session = baseDao.get_session()
    g = Group()
    g.group_uuid = uuid.uuid4()
    g.group_name = group_name
    g.group_de = group_de
    g.created_ts = datetime.now()
    g.private_fl = False
    g.group_type_cd = 'SP'
    return groupDao.add_group(session, g)
예제 #2
0
    def test_add_group(self):
        session = baseDao.get_session()
        g = Group()
        g.group_uuid = uuid.uuid4()
        g.group_name = "Group_" + randomUtil.random_string(10, 10)
        g.group_de = "Group Description: " + randomUtil.random_string(10, 10)
        g.group_type_cd = 'SP'
        g.created_ts = datetime.now()
        g.private_fl = False
        new_group = groupDao.add_group(session, g)

        self.assertTrue(new_group.group_id > 0)