Exemplo n.º 1
0
    def test_not_is_eligible_to_modify_end_year_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_end_year_by_proposal(learning_unit_yr,
                                                       person_faculty_manager,
                                                       True)
            self.assertEqual(
                '{}'.format(perm_ex.exception),
                MSG_NOT_ELIGIBLE_TO_MODIFY_END_YEAR_PROPOSAL_ON_THIS_YEAR)
Exemplo n.º 2
0
 def test_is_eligible_to_modify_end_year_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_end_year_by_proposal(learning_unit_yr,
                                                    person_faculty_manager,
                                                    True))