def setUp(self): self.provider = ModelFactories.get_provider_test_object() self.campus1 = ModelFactories.get_campus_test_object() self.campus2 = ModelFactories.get_campus_test_object() self.qualification1 = ModelFactories.get_qualification_test_object() self.qualification2 = ModelFactories.get_qualification_test_object() self.qualification3 = ModelFactories.get_qualification_test_object() self.campus1.provider = self.provider self.campus2.provider = self.provider self.qualification1.campus = self.campus1 self.qualification2.campus = self.campus2 self.qualification3.campus = self.campus2 self.campus1.save() self.campus2.save() self.qualification1.save() self.qualification2.save() self.qualification3.save()
def setUp(self): self.qualification = ModelFactories.get_qualification_test_object() self.empty_qualification = Qualification() self.requirement = ModelFactories.get_requirement_test_object() self.requirement.qualification = self.qualification self.requirement.save() self.qa = QualificationAudit(self.qualification) self.empty_qa = QualificationAudit(self.empty_qualification)
def test_soft_delete_campus(self): self.qualification1 = ModelFactories.get_qualification_test_object() self.qualification1.campus = self.campus self.assertFalse(self.campus.deleted) self.assertFalse(self.qualification1.deleted) self.qualification1.save() self.campus.soft_delete() self.qualification1 = self.campus.qualification_set.first() self.assertTrue(self.campus.deleted) self.assertTrue(self.qualification1.deleted)
def setUp(self): self.qualification = ModelFactories.get_qualification_test_object() self.url = reverse('create-or-update-event', args=[str(self.qualification.id), 'qualification']) self.data = { 'name': 'TestName', 'date_start': '2999-10-14', 'date_end': '2999-10-15', 'http_link': '' }
def setUp(self): self.provider = ModelFactories.get_provider_test_object(new_id=42) self.campus = ModelFactories.get_campus_test_object(new_id=420) self.qualification = ModelFactories.get_qualification_test_object() self.qualification.campus = self.campus qualification_form_url = reverse('edit-qualification', args=(self.provider.id, self.campus.id, self.qualification.id)) self.qualification_form_url = ( f'{self.live_server_url}{qualification_form_url}')
def setUp(self): self.qualification = ModelFactories.get_qualification_test_object() self.wizard_url = reverse( 'edit-qualification', args=( self.qualification.campus.provider.id, self.qualification.campus.id, self.qualification.id)) self.user = User.objects.get(pk=3) self.user.set_password(self.user.password) self.qualification_data_process = QualificationFormWizardDataProcess( qualification=self.qualification, edited_by=self.user )
def setUp(self): self.qualification = ModelFactories.get_qualification_test_object()