Commit ee24e106 by Usman Khalid

Use unicode course titles for bulk email tests

parent afccb17a
# -*- coding: utf-8 -*-
""" """
Unit tests for student optouts from course email Unit tests for student optouts from course email
""" """
...@@ -26,7 +27,8 @@ class TestOptoutCourseEmails(ModuleStoreTestCase): ...@@ -26,7 +27,8 @@ class TestOptoutCourseEmails(ModuleStoreTestCase):
""" """
def setUp(self): 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.instructor = AdminFactory.create()
self.student = UserFactory.create() self.student = UserFactory.create()
CourseEnrollmentFactory.create(user=self.student, course_id=self.course.id) CourseEnrollmentFactory.create(user=self.student, course_id=self.course.id)
......
...@@ -48,7 +48,8 @@ class TestEmailSendFromDashboard(ModuleStoreTestCase): ...@@ -48,7 +48,8 @@ class TestEmailSendFromDashboard(ModuleStoreTestCase):
@patch.dict(settings.FEATURES, {'ENABLE_INSTRUCTOR_EMAIL': True, 'REQUIRE_COURSE_EMAIL_AUTH': False}) @patch.dict(settings.FEATURES, {'ENABLE_INSTRUCTOR_EMAIL': True, 'REQUIRE_COURSE_EMAIL_AUTH': False})
def setUp(self): 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) self.instructor = InstructorFactory(course=self.course.location)
......
# -*- coding: utf-8 -*-
""" """
Unit tests for handling email sending errors Unit tests for handling email sending errors
""" """
...@@ -43,7 +44,8 @@ class TestEmailErrors(ModuleStoreTestCase): ...@@ -43,7 +44,8 @@ class TestEmailErrors(ModuleStoreTestCase):
""" """
def setUp(self): 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.instructor = AdminFactory.create()
self.client.login(username=self.instructor.username, password="test") self.client.login(username=self.instructor.username, password="test")
......
# -*- coding: utf-8 -*-
""" """
Unit tests for bulk-email-related forms. Unit tests for bulk-email-related forms.
""" """
...@@ -23,8 +24,8 @@ class CourseAuthorizationFormTest(ModuleStoreTestCase): ...@@ -23,8 +24,8 @@ class CourseAuthorizationFormTest(ModuleStoreTestCase):
"""Test the CourseAuthorizationAdminForm form for Mongo-backed courses.""" """Test the CourseAuthorizationAdminForm form for Mongo-backed courses."""
def setUp(self): def setUp(self):
# Make a mongo course course_title = u"ẗëṡẗ title イ乇丂イ ᄊ乇丂丂ムg乇 キo尺 ムレレ тэѕт мэѕѕаБэ"
self.course = CourseFactory.create() self.course = CourseFactory.create(display_name=course_title)
def tearDown(self): def tearDown(self):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment