Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
4f9e5109
Commit
4f9e5109
authored
11 years ago
by
Jason Bau
Browse files
Options
Downloads
Patches
Plain Diff
remove vestigal references to fake_smtp_server
parent
ca33a1dc
No related branches found
Branches containing commit
Tags
release-2021-05-03-16.32
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/djangoapps/bulk_email/tests/test_err_handling.py
+0
-9
0 additions, 9 deletions
lms/djangoapps/bulk_email/tests/test_err_handling.py
with
0 additions
and
9 deletions
lms/djangoapps/bulk_email/tests/test_err_handling.py
+
0
−
9
View file @
4f9e5109
...
...
@@ -18,8 +18,6 @@ from bulk_email.tasks import delegate_email_batches
from
mock
import
patch
,
Mock
from
smtplib
import
SMTPDataError
,
SMTPServerDisconnected
,
SMTPConnectError
TEST_SMTP_PORT
=
1025
class
EmailTestException
(
Exception
):
pass
...
...
@@ -38,14 +36,9 @@ class TestEmailErrors(ModuleStoreTestCase):
# load initial content (since we don't run migrations as part of tests):
call_command
(
"
loaddata
"
,
"
course_email_template.json
"
)
#self.smtp_server_thread = FakeSMTPServerThread('localhost', TEST_SMTP_PORT)
#self.smtp_server_thread.start()
self
.
url
=
reverse
(
'
instructor_dashboard
'
,
kwargs
=
{
'
course_id
'
:
self
.
course
.
id
})
def
tearDown
(
self
):
#self.smtp_server_thread.stop()
patch
.
stopall
()
@patch
(
'
bulk_email.tasks.get_connection
'
,
autospec
=
True
)
...
...
@@ -124,8 +117,6 @@ class TestEmailErrors(ModuleStoreTestCase):
"""
Test that celery handles SMTPConnectError by retrying.
"""
# SMTP reply is already specified in fake SMTP Channel created
#self.smtp_server_thread.server.set_errtype("CONN")
get_conn
.
return_value
.
open
.
side_effect
=
SMTPConnectError
(
424
,
"
Bad Connection
"
)
test_email
=
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment