def test_creation_learning_unit_component_class_with_different_year(self):

        learning_container = LearningContainer()

        learning_container_year = LearningContainerYear(
            title="Biology",
            acronym="LBIO1212",
            academic_year=self.current_academic_year,
            learning_container=learning_container)
        #Composant annualisé est associé à son composant et à son conteneur annualisé
        learning_component_year = LearningComponentYear(
            learning_container_year=learning_container_year,
            title="Cours magistral",
            acronym="/C",
            comment="TEST")

        #UE associée à un conteneur d'une année différente du composant
        learning_unit_year = LearningUnitYear(
            title="Biology",
            acronym="LBIO1212",
            academic_year=self.current_academic_year_different,
            learning_container_year=learning_container_year)

        #Association du conteneur et de son composant dont les années académiques diffèrent l'une de l'autre
        LearningUnitComponent(learning_component_year=learning_component_year,
                              learning_unit_year=learning_unit_year)

        self.assertEqual(learning_component_year.learning_container_year,
                         learning_unit_year.learning_container_year)
Exemple #2
0
 def _create_learning_unit_year_partim(self, common_title, speicific_title):
     return LearningUnitYear(
         subtype=learning_unit_year_subtypes.PARTIM,
         specific_title=speicific_title,
         learning_container_year=LearningContainerYear(common_title=common_title)
     )