def test_clean_case_start_year_greater_than_end_year_error(self): education_group = EducationGroupFactory.build( start_year=self.academic_year_2000, end_year=self.academic_year_1999 ) with self.assertRaises(ValidationError): education_group.clean()
def test_clean_case_start_year_lower_to_end_year_no_error(self): education_group = EducationGroupFactory.build( start_year=self.academic_year_1999, end_year=self.academic_year_2000 ) education_group.clean() education_group.save()
def test_clean_case_start_year_equals_to_end_year_no_error(self): education_group = EducationGroupFactory.build( start_year=2000, end_year=2000 ) education_group.clean() education_group.save()