コード例 #1
0
    def setUpTestData(cls):
        cls.academic_years = AcademicYearFactory.produce()
        cls.luys = LearningUnitYearFactory.create_batch(
            4, academic_year__current=True)
        cls.url = reverse("learning_units_summary")
        cls.get_data = {
            "academic_year": get_current_year(),
        }
        cls.tuples_xls_status_value_with_xls_method_function = ((
            "xls_teaching_material",
            "base.views.learning_units.search.educational_information.generate_xls_teaching_material"
        ), )

        cls.person = PersonWithPermissionsFactory("can_access_learningunit")
コード例 #2
0
ファイル: test_proposal.py プロジェクト: allouchmed/osis
    def setUpTestData(cls):
        cls.academic_years = AcademicYearFactory.produce()
        cls.luys = LearningUnitYearFactory.create_batch(4)
        cls.url = reverse("learning_units_proposal")
        cls.get_data = {
            "academic_year": str(cls.luys[0].academic_year.id),
        }
        cls.tuples_xls_status_value_with_xls_method_function = ((
            "xls",
            "base.views.learning_units.search.common.create_xls_proposal"
        ), ("xls_comparison",
            "base.views.learning_units.search.common.create_xls_proposal_comparison"
            ))

        cls.person = PersonWithPermissionsFactory("can_access_learningunit")
コード例 #3
0
ファイル: test_borrowed.py プロジェクト: allouchmed/osis
    def setUpTestData(cls):
        cls.academic_years = AcademicYearFactory.produce()
        cls.luys = LearningUnitYearFactory.create_batch(4)
        cls.url = reverse("learning_units_borrowed_course")
        cls.get_data = {
            "academic_year": str(cls.luys[0].academic_year.id),
        }
        cls.tuples_xls_status_value_with_xls_method_function = (
            ("xls", "base.views.learning_units.search.common.create_xls"),
            ("xls_with_parameters",
             "base.views.learning_units.search.common.create_xls_with_parameters"
             ),
            ("xls_attributions",
             "base.views.learning_units.search.common.create_xls_attributions"
             ),
            ("xls_comparison",
             "base.views.learning_units.search.common.create_xls_comparison"),
            ("xls_educational_specifications",
             "base.views.learning_units.search.common.create_xls_educational_information_and_specifications"
             ),
        )

        cls.person = PersonWithPermissionsFactory("can_access_learningunit")
コード例 #4
0
 def generate_elements(cls):
     return LearningUnitYearFactory.create_batch(
         5, academic_year=cls.academic_year)