def setUp(self):
     self.event = EventSession()
     self.event.testing_center = 'testing center'
     self.event.course_id = 'org1/course1/run1'
     self.event.course_event_id = '1'
     self.event.status = EventSession.IN_PROGRESS
     self.user = User.objects.create_user('test', '*****@*****.**',
                                          'password')
     self.event.proctor = self.user
     self.event.save()
     Permission.objects.create(user=self.user,
                               object_type="*",
                               object_id="*",
                               role=Permission.ROLE_PROCTOR)
     exam = Exam()
     exam.exam_code = 'examCode'
     exam.organization = 'organization'
     exam.duration = 1
     exam.reviewed_exam = 'reviewedExam'
     exam.reviewer_notes = 'reviewerNotes'
     exam.exam_password = '******'
     exam.exam_sponsor = 'examSponsor'
     exam.exam_name = 'examName'
     exam.ssi_product = 'ssiProduct'
     exam.first_name = 'firstName'
     exam.last_name = 'lastName'
     exam.username = '******'
     exam.user_id = '1'
     exam.email = '*****@*****.**'
     exam.exam_id = self.event.course_event_id
     exam.course_id = self.event.course_id
     exam.event = self.event
     exam.save()
     self.exam = exam
Esempio n. 2
0
 def setUp(self):
     self.user = User.objects.create_user(
         'test', '*****@*****.**', 'testpassword'
     )
     Permission.objects.create(
         user=self.user,
         object_id='*',
         object_type='*'
     )
     event = EventSession()
     event.testing_center = "new center"
     event.course_id = "new course"
     event.course_event_id = "new event"
     event.proctor = self.user
     event.save()
     exam = Exam()
     exam.exam_code = 'examCode'
     exam.organization = 'organization'
     exam.duration = 1
     exam.reviewed_exam = 'reviewedExam'
     exam.reviewer_notes = 'reviewerNotes'
     exam.exam_password = '******'
     exam.exam_sponsor = 'examSponsor'
     exam.exam_name = 'examName'
     exam.ssi_product = 'ssiProduct'
     exam.first_name = 'firstName'
     exam.last_name = 'lastName'
     exam.username = '******'
     exam.user_id = 1
     exam.email = '*****@*****.**'
     exam.exam_id = event.course_event_id
     exam.course_id = event.course_id
     exam.event = event
     exam.save()
     self.exam = exam
 def setUp(self):
     self.event = EventSession()
     self.event.testing_center = 'testing center'
     self.event.course_id = 'org1/course1/run1'
     self.event.course_event_id = '1'
     self.event.status = EventSession.IN_PROGRESS
     self.user = User.objects.create_user(
         'test',
         '*****@*****.**',
         'password'
     )
     self.event.proctor = self.user
     self.event.save()
     Permission.objects.create(
         user=self.user,
         object_type="*",
         object_id="*",
         role=Permission.ROLE_PROCTOR
     )
     exam = Exam()
     exam.exam_code = 'examCode'
     exam.organization = 'organization'
     exam.duration = 1
     exam.reviewed_exam = 'reviewedExam'
     exam.reviewer_notes = 'reviewerNotes'
     exam.exam_password = '******'
     exam.exam_sponsor = 'examSponsor'
     exam.exam_name = 'examName'
     exam.ssi_product = 'ssiProduct'
     exam.first_name = 'firstName'
     exam.last_name = 'lastName'
     exam.username = '******'
     exam.user_id = '1'
     exam.email = '*****@*****.**'
     exam.exam_id = self.event.course_event_id
     exam.course_id = self.event.course_id
     exam.event = self.event
     exam.save()
     self.exam = exam