Esempio n. 1
0
    def setUp(self):
        run()
        super().setUp()
        employee = User.create_user('employee', 'employee')
        self.employee = self.login_as(employee)
        self._employee = employee

        manager = User.create_user('manager', 'manager')
        self.manager = self.login_as(manager)
        self._manager = manager
        group = Group.objects.create(name='test')
        ManagerGroup.objects.create(group=group,
                                    scope_subject=2,
                                    apps=['app', 'demo'])
        GroupMember.objects.create(owner=group,
                                   user=User.objects.get(username='******'))
Esempio n. 2
0
def init_idp_config(apps, schema_editor):  # pylint: disable=unused-argument
    '''初始化IdP配置
    '''
    run()
Esempio n. 3
0
 def setUp(self):
     super().setUp()
     for perm in Perm.valid_objects.all():
         perm.kill()
     run()