From c7ede0df4bf949c7705c672bef4aad48aea8216a Mon Sep 17 00:00:00 2001 From: Christine Lytwynec Date: Mon, 5 Jan 2015 16:19:26 -0500 Subject: [PATCH] fixing pep8 violations --- lms/djangoapps/bulk_email/tests/test_email.py | 3 +-- lms/djangoapps/bulk_email/tests/test_err_handling.py | 1 + lms/djangoapps/bulk_email/tests/test_models.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/bulk_email/tests/test_email.py b/lms/djangoapps/bulk_email/tests/test_email.py index 810c057acd..5249fdf290 100644 --- a/lms/djangoapps/bulk_email/tests/test_email.py +++ b/lms/djangoapps/bulk_email/tests/test_email.py @@ -108,7 +108,6 @@ class TestEmailSendFromDashboard(ModuleStoreTestCase): # We should get back a HttpResponseForbidden (status code 403) self.assertContains(response, "Email is not enabled for this course.", status_code=403) - @patch('bulk_email.models.html_to_text', Mock(return_value='Mocking CourseEmail.text_message')) def test_send_to_self(self): """ @@ -230,7 +229,7 @@ class TestEmailSendFromDashboard(ModuleStoreTestCase): '[' + self.course.display_name + '] ' + uni_subject ) - @skipIf(os.environ.get("Travis")=='true', "Skip this test in Travis CI.") + @skipIf(os.environ.get("Travis") == 'true', "Skip this test in Travis CI.") def test_unicode_message_send_to_all(self): """ Make sure email (with Unicode characters) send to all goes there. diff --git a/lms/djangoapps/bulk_email/tests/test_err_handling.py b/lms/djangoapps/bulk_email/tests/test_err_handling.py index e3de3e8f50..867183cb2b 100644 --- a/lms/djangoapps/bulk_email/tests/test_err_handling.py +++ b/lms/djangoapps/bulk_email/tests/test_err_handling.py @@ -36,6 +36,7 @@ class EmailTestException(Exception): """Mock exception for email testing.""" pass + @patch('bulk_email.models.html_to_text', Mock(return_value='Mocking CourseEmail.text_message')) @override_settings(MODULESTORE=TEST_DATA_MOCK_MODULESTORE) @patch.dict(settings.FEATURES, {'ENABLE_INSTRUCTOR_EMAIL': True, 'REQUIRE_COURSE_EMAIL_AUTH': False}) diff --git a/lms/djangoapps/bulk_email/tests/test_models.py b/lms/djangoapps/bulk_email/tests/test_models.py index f004fcf799..4ee232ecfe 100644 --- a/lms/djangoapps/bulk_email/tests/test_models.py +++ b/lms/djangoapps/bulk_email/tests/test_models.py @@ -12,6 +12,7 @@ from mock import patch, Mock from bulk_email.models import CourseEmail, SEND_TO_STAFF, CourseEmailTemplate, CourseAuthorization from opaque_keys.edx.locations import SlashSeparatedCourseKey + @patch('bulk_email.models.html_to_text', Mock(return_value='Mocking CourseEmail.text_message')) class CourseEmailTest(TestCase): """Test the CourseEmail model."""