Beispiel #1
0
 def test_delete(self):
     waitlist = Waitlist.objects.create(student=StudentFactory(),
                                        module=ModuleFactory())
     response = self.client.post(waitlist.get_delete_url())
     self.assertEqual(response.status_code, 302)
     with self.assertRaises(Waitlist.DoesNotExist):
         waitlist.refresh_from_db()
Beispiel #2
0
 def test_non_uk_overseas_location(self):
     programme = ProgrammeFactory(
         study_location_id=models.UK_DISTANCE_STUDY_LOCATION)
     student = StudentFactory(domicile_id=181)
     qa = factories.QualificationAimFactory(student=student,
                                            programme=programme)
     self.assertEqual(qa.study_location_id,
                      models.NON_UK_DISTANCE_STUDY_LOCATION)
 def setUpTestData(cls):
     """Create a hesa-returnable student record"""
     cls.programme = ProgrammeFactory(
         qualification_id=INSTITUTIONAL_CREDIT_QUALIFICATION)
     cls.student = StudentFactory(domicile_id=ENGLAND_DOMICILE)
     cls.qa = QualificationAimFactory(
         student=cls.student,
         programme=cls.programme,
     )
     cls.module = ModuleFactory(credit_points=10, start_date='2021-01-01')
     cls.enrolment = EnrolmentFactory(qa=cls.qa,
                                      module=cls.module,
                                      status_id=CONFIRMED_STATUS,
                                      result_id=PASSED_RESULT)
Beispiel #4
0
 def setUpTestData(cls):
     cls.student = StudentFactory()
Beispiel #5
0
 def setUpTestData(cls):
     super().setUpTestData()
     cls.module = ModuleFactory()
     cls.student = StudentFactory()
     cls.url = reverse('waitlist:add',
                       kwargs={'student_id': cls.student.id})
Beispiel #6
0
 def setUpTestData(cls):
     super().setUpTestData()
     student = StudentFactory(firstname='João', surname='Český')
     TutorFactory(student=student)
     cls.url = reverse('autocomplete:tutor')
    def setUpTestData(cls):
        cls.user = get_user_model().objects.create_user(username='******')
        cls.student = StudentFactory()
        cls.programme = ProgrammeFactory()

        cls.url = reverse('qualification_aim:new', args=[cls.student.pk])
Beispiel #8
0
 def setUpTestData(cls):
     cls.programme = ProgrammeFactory(
         study_location_id=models.AT_PROVIDER_STUDY_LOCATION)
     cls.student = StudentFactory(highest_qualification_id='C20')
Beispiel #9
0
 def setUpTestData(cls):
     super().setUpTestData()
     cls.account = models.WebsiteAccount.objects.create(
         student=StudentFactory(), )
     cls.url = reverse('website_account:edit', args=[cls.account.pk])
Beispiel #10
0
 def setUpTestData(cls):
     super().setUpTestData()
     cls.student = StudentFactory()
     cls.url = reverse('website_account:create', args=[cls.student.pk])