diff --git a/common/djangoapps/student/tests/tests.py b/common/djangoapps/student/tests/tests.py index b1d208433f..5e29bf1151 100644 --- a/common/djangoapps/student/tests/tests.py +++ b/common/djangoapps/student/tests/tests.py @@ -950,7 +950,7 @@ class RelatedProgramsTests(ProgramsApiConfigMixin, SharedModuleStoreTestCase): def expected_link_text(self, program): """Construct expected dashboard link text.""" - return '{name} {category}'.format(name=program['name'], category=program['category']) + return u'{name} {category}'.format(name=program['name'], category=program['category']) def test_related_programs_listed(self): """Verify that related programs are listed when the programs API returns data.""" @@ -982,6 +982,14 @@ class RelatedProgramsTests(ProgramsApiConfigMixin, SharedModuleStoreTestCase): self.assert_related_programs(response) self.assertNotContains(response, unrelated_program['name']) + def test_program_title_unicode(self): + """Verify that the dashboard can deal with programs whose titles contain Unicode.""" + self.programs[0]['name'] = u'Bases matemáticas para estudiar ingenierÃa' + self.mock_programs_api(self.programs) + + response = self.client.get(self.url) + self.assert_related_programs(response) + class UserAttributeTests(TestCase): """Tests for the UserAttribute model.""" diff --git a/lms/templates/dashboard/_dashboard_course_listing.html b/lms/templates/dashboard/_dashboard_course_listing.html index d0733d0fb9..c9d867c9b4 100644 --- a/lms/templates/dashboard/_dashboard_course_listing.html +++ b/lms/templates/dashboard/_dashboard_course_listing.html @@ -284,7 +284,7 @@ from student.helpers import ( % for program in related_programs: