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
4f6eaa59
Commit
4f6eaa59
authored
Apr 09, 2017
by
Salah Alomari
Committed by
Omar Al-Ithawi
Jun 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use platform_name instead of site_name in password reset email
parent
e6c94400
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
common/djangoapps/student/tests/test_reset_password.py
+9
-5
lms/templates/registration/password_reset_email.html
+1
-1
No files found.
common/djangoapps/student/tests/test_reset_password.py
View file @
4f6eaa59
...
...
@@ -185,18 +185,22 @@ class ResetPasswordTests(EventTestMixin, CacheIsolationTestCase):
req
=
self
.
request_factory
.
post
(
'/password_reset/'
,
{
'email'
:
self
.
user
.
email
}
)
req
.
is_secure
=
Mock
(
return_value
=
True
)
req
.
get_host
=
Mock
(
return_value
=
domain_override
)
req
.
user
=
self
.
user
password_reset
(
req
)
_
,
msg
,
_
,
_
=
send_email
.
call_args
[
0
]
reset_msg
=
"you requested a password reset for your user account at {}"
reset_intro_msg
=
"you requested a password reset for your user account at {}"
.
format
(
platform_name
)
self
.
assertIn
(
reset_intro_msg
,
msg
)
reset_link
=
"https://{}/"
if
domain_override
:
reset_
msg
=
reset_msg
.
format
(
domain_override
)
reset_
link
=
reset_link
.
format
(
domain_override
)
else
:
reset_
msg
=
reset_msg
.
format
(
settings
.
SITE_NAME
)
reset_
link
=
reset_link
.
format
(
settings
.
SITE_NAME
)
self
.
assertIn
(
reset_
msg
,
msg
)
self
.
assertIn
(
reset_
link
,
msg
)
sign_off
=
"The {} Team"
.
format
(
platform_name
)
self
.
assertIn
(
sign_off
,
msg
)
...
...
@@ -221,7 +225,7 @@ class ResetPasswordTests(EventTestMixin, CacheIsolationTestCase):
password_reset
(
req
)
_
,
msg
,
from_addr
,
_
=
send_email
.
call_args
[
0
]
reset_msg
=
"you requested a password reset for your user account at
openedx.localhost"
reset_msg
=
"you requested a password reset for your user account at
{}"
.
format
(
fake_get_value
(
'platform_name'
))
self
.
assertIn
(
reset_msg
,
msg
)
...
...
lms/templates/registration/password_reset_email.html
View file @
4f6eaa59
{% load i18n %}{% autoescape off %}
{% blocktrans %}You're receiving this e-mail because you requested a password reset for your user account at {{
site
_name }}.{% endblocktrans %}
{% blocktrans %}You're receiving this e-mail because you requested a password reset for your user account at {{
platform
_name }}.{% endblocktrans %}
{% trans "Please go to the following page and choose a new password:" %}
{% block reset_link %}
...
...
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