コード例 #1
0
ファイル: test_business.py プロジェクト: ultrasound/osis
 def test_get_achievements_case_get_french_version_no_results(self):
     intro_extra_content = business.get_intro_extra_content_achievements(
         self.education_group_year,
         settings.LANGUAGE_CODE_FR
     )
     self.assertIsInstance(intro_extra_content, dict)
     self.assertDictEqual(intro_extra_content, {})
コード例 #2
0
ファイル: test_business.py プロジェクト: kelvinninja1/osis
    def test_get_achievements_case_get_english_version(self):
        intro_extra_content = business.get_intro_extra_content_achievements(
            self.education_group_year, settings.LANGUAGE_CODE_EN)

        self.assertIsInstance(intro_extra_content, dict)
        self.assertEqual(intro_extra_content[self.cms_label_name],
                         self.introduction.text)
コード例 #3
0
def get_skills_and_achievements(education_group_year, language_code):
    intro_extra_content = business.get_intro_extra_content_achievements(education_group_year, language_code)
    achievements = business.get_achievements(education_group_year, language_code)

    return {
        'id': business.SKILLS_AND_ACHIEVEMENTS_KEY,
        'label': business.SKILLS_AND_ACHIEVEMENTS_KEY,
        'content': {
            'intro': intro_extra_content.get('skills_and_achievements_introduction') or None,
            'blocs': achievements,
            'extra': intro_extra_content.get('skills_and_achievements_additional_text') or None
        }
    }