From ee24e1062a613dd58403809fe7978ada4c44f8c0 Mon Sep 17 00:00:00 2001 From: Usman Khalid <2200617@gmail.com> Date: Thu, 30 Jan 2014 18:38:28 +0500 Subject: [PATCH] Use unicode course titles for bulk email tests --- lms/djangoapps/bulk_email/tests/test_course_optout.py | 4 +++- lms/djangoapps/bulk_email/tests/test_email.py | 3 ++- lms/djangoapps/bulk_email/tests/test_err_handling.py | 4 +++- lms/djangoapps/bulk_email/tests/test_forms.py | 5 +++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lms/djangoapps/bulk_email/tests/test_course_optout.py b/lms/djangoapps/bulk_email/tests/test_course_optout.py index 086d51b87a..5cd54686b1 100644 --- a/lms/djangoapps/bulk_email/tests/test_course_optout.py +++ b/lms/djangoapps/bulk_email/tests/test_course_optout.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ Unit tests for student optouts from course email """ @@ -26,7 +27,8 @@ class TestOptoutCourseEmails(ModuleStoreTestCase): """ def setUp(self): - self.course = CourseFactory.create() + course_title = u"ẗëṡẗ title イ乇丂イ ᄊ乇丂丂ムg乇 キo尺 ムレレ тэѕт мэѕѕаБэ" + self.course = CourseFactory.create(display_name=course_title) self.instructor = AdminFactory.create() self.student = UserFactory.create() CourseEnrollmentFactory.create(user=self.student, course_id=self.course.id) diff --git a/lms/djangoapps/bulk_email/tests/test_email.py b/lms/djangoapps/bulk_email/tests/test_email.py index d20d532c97..c96727dfcf 100644 --- a/lms/djangoapps/bulk_email/tests/test_email.py +++ b/lms/djangoapps/bulk_email/tests/test_email.py @@ -48,7 +48,8 @@ class TestEmailSendFromDashboard(ModuleStoreTestCase): @patch.dict(settings.FEATURES, {'ENABLE_INSTRUCTOR_EMAIL': True, 'REQUIRE_COURSE_EMAIL_AUTH': False}) def setUp(self): - self.course = CourseFactory.create() + course_title = u"ẗëṡẗ title イ乇丂イ ᄊ乇丂丂ムg乇 キo尺 ムレレ тэѕт мэѕѕаБэ" + self.course = CourseFactory.create(display_name=course_title) self.instructor = InstructorFactory(course=self.course.location) diff --git a/lms/djangoapps/bulk_email/tests/test_err_handling.py b/lms/djangoapps/bulk_email/tests/test_err_handling.py index 9fda6fc46f..f9365c86ef 100644 --- a/lms/djangoapps/bulk_email/tests/test_err_handling.py +++ b/lms/djangoapps/bulk_email/tests/test_err_handling.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ Unit tests for handling email sending errors """ @@ -43,7 +44,8 @@ class TestEmailErrors(ModuleStoreTestCase): """ def setUp(self): - self.course = CourseFactory.create() + course_title = u"ẗëṡẗ title イ乇丂イ ᄊ乇丂丂ムg乇 キo尺 ムレレ тэѕт мэѕѕаБэ" + self.course = CourseFactory.create(display_name=course_title) self.instructor = AdminFactory.create() self.client.login(username=self.instructor.username, password="test") diff --git a/lms/djangoapps/bulk_email/tests/test_forms.py b/lms/djangoapps/bulk_email/tests/test_forms.py index 0b86344379..1e45670cc9 100644 --- a/lms/djangoapps/bulk_email/tests/test_forms.py +++ b/lms/djangoapps/bulk_email/tests/test_forms.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ Unit tests for bulk-email-related forms. """ @@ -23,8 +24,8 @@ class CourseAuthorizationFormTest(ModuleStoreTestCase): """Test the CourseAuthorizationAdminForm form for Mongo-backed courses.""" def setUp(self): - # Make a mongo course - self.course = CourseFactory.create() + course_title = u"ẗëṡẗ title イ乇丂イ ᄊ乇丂丂ムg乇 キo尺 ムレレ тэѕт мэѕѕаБэ" + self.course = CourseFactory.create(display_name=course_title) def tearDown(self): """