17 lines
800 B
Python
17 lines
800 B
Python
import re
|
|
|
|
with open('addons/education_lms/tests/test_education_lms.py', 'r') as f:
|
|
text = f.read()
|
|
|
|
text = text.replace(
|
|
""" rules = self.env['ir.rule'].with_user(self.user_student_a)._get_rules('education.lms.course', 'read')
|
|
print(f"\\nDEBUG APPLIED RULES FOR STUDENT A: {rules.mapped('name')}")""",
|
|
""" rules = self.env['ir.rule'].with_user(self.user_student_a)._get_rules('education.lms.course', 'read').sudo()
|
|
print(f"\\nDEBUG APPLIED RULES FOR STUDENT A: {rules.mapped('name')}")
|
|
print(f"DEBUG RULE DOMAINS: {rules.mapped('domain_force')}")
|
|
print(f"DEBUG RULE PERMS: {[(r.perm_read, r.perm_write, r.perm_create, r.perm_unlink) for r in rules]}")"""
|
|
)
|
|
|
|
with open('addons/education_lms/tests/test_education_lms.py', 'w') as f:
|
|
f.write(text)
|