Univention Bugzilla – Attachment 10578 Details for
Bug 52500
ucs-test for ucs-school-object-consistency script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
empty function which should be implemented
77_object_consistency_script.py (text/plain), 2.10 KB, created by
Toni Röhmeyer
on 2020-12-15 16:21:54 CET
(
hide
)
Description:
empty function which should be implemented
Filename:
MIME Type:
Creator:
Toni Röhmeyer
Created:
2020-12-15 16:21:54 CET
Size:
2.10 KB
patch
obsolete
>#!/usr/share/ucs-test/runner /usr/bin/pytest -l -v >## -*- coding: utf-8 -*- >## desc: test ucsschool.lib.models.group.WorkGroup CRUD operations >## roles: [domaincontroller_master] >## tags: [apptest,ucsschool,ucsschool_import1] >## exposure: dangerous >## packages: >## - python-ucs-school > ># ># Hint: When debugging interactively, disable output capturing: ># $ pytest -s -l -v ./......py::test_create ># > >try: > from typing import Dict, List, Tuple >except ImportError: > pass > >import univention.testing.udm >from ucsschool.lib.models.group import SchoolClass, WorkGroup >from ucsschool.lib.models.share import ClassShare, MarketplaceShare, WorkGroupShare >from ucsschool.lib.models.utils import exec_cmd >from ucsschool.lib.roles import ( > create_ucsschool_role_string, > role_exam_user, > role_school_admin, > role_school_class, > role_school_class_share, > role_staff, > role_student, > role_teacher, >) > >SCRIPT_PATH = "./usr/share/ucs-school-umc-diagnostic/scripts/ucs-school-object-consistency" > > >def test_school_role_for_each_school(create_ou, schoolenv): > > ou_name, ou_dn = create_ou() > student_name, student_dn = schoolenv.create_student( > ou_name, use_cli=False, wait_for_replication=False > ) > teacher_name, teacher_dn = schoolenv.create_teacher( > ou_name, use_cli=False, wait_for_replication=False > ) > > false_role_staff = create_ucsschool_role_string(role_staff, ou_name) > false_role_student = create_ucsschool_role_string(role_student, ou_name) > udm.modify_object("users/user", dn=student_dn, modify={"ucsschoolRole": false_role_staff}) > udm.modify_object("users/user", dn=teacher_dn, modify={"ucsschoolRole": false_role_student}) > > rv, stdout, stderr = exec_cmd( > [SCRIPT_PATH, "--school", ou_name], log=True, raise_exc=True > ) > # check out for containing the two role errors > > >def test_group_membership_for_each_school(): > pass > > >def test_mandatory_group_existence_for_each_school(): > pass > > >def test_mandatory_container_existence_for_each_school(): > pass > > >def test_class_shares(): > pass > > >def test_martkplatz_share_existence_for_each_school(): > pass
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 52500
: 10578