Example #1
0
 def test_when_external_learning_unit_is_not_co_graduation(
         self, mock_is_person_linked_to_entity_in_charge_of_lu,
         mock_is_learning_unit_year_in_state_to_be_modified,
         mock_is_year_editable):
     mock_is_person_linked_to_entity_in_charge_of_lu.return_value = True
     mock_is_learning_unit_year_in_state_to_be_modified.return_value = True
     mock_is_year_editable.return_value = True
     a_person = CentralManagerFactory()
     luy = LearningUnitYearFactory(academic_year=self.academic_yr)
     ExternalLearningUnitYearFactory(learning_unit_year=luy,
                                     co_graduation=False)
     self.assertFalse(
         perms.is_external_learning_unit_cograduation(luy, a_person, False))
Example #2
0
 def test_when_learning_unit_is_not_external(self):
     learning_unit_year = LearningUnitYearFactory()
     person = PersonFactory()
     self.assertTrue(
         perms.is_external_learning_unit_cograduation(
             learning_unit_year, person, False))