Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
c7ede0df
Commit
c7ede0df
authored
Jan 05, 2015
by
Christine Lytwynec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing pep8 violations
parent
3127ac2b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
lms/djangoapps/bulk_email/tests/test_email.py
+1
-2
lms/djangoapps/bulk_email/tests/test_err_handling.py
+1
-0
lms/djangoapps/bulk_email/tests/test_models.py
+1
-0
No files found.
lms/djangoapps/bulk_email/tests/test_email.py
View file @
c7ede0df
...
@@ -108,7 +108,6 @@ class TestEmailSendFromDashboard(ModuleStoreTestCase):
...
@@ -108,7 +108,6 @@ class TestEmailSendFromDashboard(ModuleStoreTestCase):
# We should get back a HttpResponseForbidden (status code 403)
# We should get back a HttpResponseForbidden (status code 403)
self
.
assertContains
(
response
,
"Email is not enabled for this course."
,
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'
))
@patch
(
'bulk_email.models.html_to_text'
,
Mock
(
return_value
=
'Mocking CourseEmail.text_message'
))
def
test_send_to_self
(
self
):
def
test_send_to_self
(
self
):
"""
"""
...
@@ -230,7 +229,7 @@ class TestEmailSendFromDashboard(ModuleStoreTestCase):
...
@@ -230,7 +229,7 @@ class TestEmailSendFromDashboard(ModuleStoreTestCase):
'['
+
self
.
course
.
display_name
+
'] '
+
uni_subject
'['
+
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
):
def
test_unicode_message_send_to_all
(
self
):
"""
"""
Make sure email (with Unicode characters) send to all goes there.
Make sure email (with Unicode characters) send to all goes there.
...
...
lms/djangoapps/bulk_email/tests/test_err_handling.py
View file @
c7ede0df
...
@@ -36,6 +36,7 @@ class EmailTestException(Exception):
...
@@ -36,6 +36,7 @@ class EmailTestException(Exception):
"""Mock exception for email testing."""
"""Mock exception for email testing."""
pass
pass
@patch
(
'bulk_email.models.html_to_text'
,
Mock
(
return_value
=
'Mocking CourseEmail.text_message'
))
@patch
(
'bulk_email.models.html_to_text'
,
Mock
(
return_value
=
'Mocking CourseEmail.text_message'
))
@override_settings
(
MODULESTORE
=
TEST_DATA_MOCK_MODULESTORE
)
@override_settings
(
MODULESTORE
=
TEST_DATA_MOCK_MODULESTORE
)
@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
})
...
...
lms/djangoapps/bulk_email/tests/test_models.py
View file @
c7ede0df
...
@@ -12,6 +12,7 @@ from mock import patch, Mock
...
@@ -12,6 +12,7 @@ from mock import patch, Mock
from
bulk_email.models
import
CourseEmail
,
SEND_TO_STAFF
,
CourseEmailTemplate
,
CourseAuthorization
from
bulk_email.models
import
CourseEmail
,
SEND_TO_STAFF
,
CourseEmailTemplate
,
CourseAuthorization
from
opaque_keys.edx.locations
import
SlashSeparatedCourseKey
from
opaque_keys.edx.locations
import
SlashSeparatedCourseKey
@patch
(
'bulk_email.models.html_to_text'
,
Mock
(
return_value
=
'Mocking CourseEmail.text_message'
))
@patch
(
'bulk_email.models.html_to_text'
,
Mock
(
return_value
=
'Mocking CourseEmail.text_message'
))
class
CourseEmailTest
(
TestCase
):
class
CourseEmailTest
(
TestCase
):
"""Test the CourseEmail model."""
"""Test the CourseEmail model."""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment