Metatron_Student_ERP/replace_tests 2.py
2026-09-25 18:00:58 +05:30

11 lines
526 B
Python

import re
with open('addons/education_lms/tests/test_education_lms.py', 'r') as f:
text = f.read()
text = text.replace(" res = course_a.with_user(self.user_student_a).read(['name'])",
" print(f'\\nDEBUG STUDENT IDS: {self.user_student_a.student_ids}')\n print(f'DEBUG STUDENT TERM: {self.user_student_a.student_ids.academic_term_id}')\n res = course_a.with_user(self.user_student_a).read(['name'])")
with open('addons/education_lms/tests/test_education_lms.py', 'w') as f:
f.write(text)