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, {})
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)
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 } }