def test_not_is_eligible_to_modify_by_proposal(self, mock_perm): learning_unit_yr = LearningUnitYearFactory( academic_year=self.current_academic_year, subtype=learning_unit_year_subtypes.FULL, learning_container_year=self.lcy) person_faculty_manager = FacultyManagerFactory() with self.assertRaises(PermissionDenied) as perm_ex: is_eligible_to_modify_by_proposal(learning_unit_yr, person_faculty_manager, True) self.assertEqual('{}'.format(perm_ex.exception), MSG_NOT_ELIGIBLE_TO_PUT_IN_PROPOSAL_ON_THIS_YEAR)
def test_is_eligible_to_modify_by_proposal(self, mock_perm): learning_unit_yr = LearningUnitYearFactory( academic_year=self.next_academic_yr, subtype=learning_unit_year_subtypes.FULL, learning_container_year=self.lcy) person_faculty_manager = FacultyManagerFactory() self.assertTrue( is_eligible_to_modify_by_proposal(learning_unit_yr, person_faculty_manager, True))