diff --git a/server/vbv_lernwelt/core/management/commands/cypress_reset.py b/server/vbv_lernwelt/core/management/commands/cypress_reset.py index 11356a97..d4a660af 100644 --- a/server/vbv_lernwelt/core/management/commands/cypress_reset.py +++ b/server/vbv_lernwelt/core/management/commands/cypress_reset.py @@ -9,16 +9,12 @@ from vbv_lernwelt.core.constants import ( TEST_COURSE_SESSION_BERN_ID, TEST_MENTOR1_USER_ID, TEST_STUDENT1_USER_ID, - TEST_STUDENT1_VV_USER_ID, TEST_STUDENT2_USER_ID, TEST_STUDENT3_USER_ID, TEST_TRAINER1_USER_ID, ) from vbv_lernwelt.core.models import Organisation, User -from vbv_lernwelt.course.consts import ( - COURSE_TEST_ID, - COURSE_VERSICHERUNGSVERMITTLERIN_ID, -) +from vbv_lernwelt.course.consts import COURSE_TEST_ID from vbv_lernwelt.course.creators.test_course import ( create_edoniq_test_result_data, create_feedback_response_data, @@ -336,19 +332,32 @@ def command( attendance_course.save() if create_learning_mentor: - vv_course = Course.objects.get(id=COURSE_VERSICHERUNGSVERMITTLERIN_ID) - vv_course_session = CourseSession.objects.get(course=vv_course) - - vv_mentor = LearningMentor.objects.create( - course=vv_course, + uk_mentor = LearningMentor.objects.create( + course=Course.objects.get(id=COURSE_TEST_ID), mentor=User.objects.get(id=TEST_MENTOR1_USER_ID), ) - - csu = CourseSessionUser.objects.get( - user__id=TEST_STUDENT1_VV_USER_ID, course_session=vv_course_session + uk_mentor.participants.add( + CourseSessionUser.objects.get( + user__id=TEST_STUDENT1_USER_ID, + course_session=CourseSession.objects.get( + id=TEST_COURSE_SESSION_BERN_ID + ), + ) ) - vv_mentor.participants.add(csu) + # FIXME: Add mentor to VV course as well, once we can: + # -> https://bitbucket.org/iterativ/vbv_lernwelt/pull-requests/287 + # vv_course = Course.objects.get(id=COURSE_VERSICHERUNGSVERMITTLERIN_ID) + # vv_course_session = CourseSession.objects.get(course=vv_course) + # vv_mentor = LearningMentor.objects.create( + # course=vv_course, + # mentor=User.objects.get(id=TEST_MENTOR1_USER_ID), + # ) + # vv_mentor.participants.add( + # CourseSessionUser.objects.get( + # user__id=TEST_STUDENT1_VV_USER_ID, course_session=vv_course_session + # ) + # ) course = Course.objects.get(id=COURSE_TEST_ID) course.enable_circle_documents = enable_circle_documents