Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
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
f528e31b
Unverified
Commit
f528e31b
authored
5 years ago
by
Awais Qureshi
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #21619 from edx/awais786/BOM-416
Awais786/bom 416
parents
762db8a2
ff98318a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/djangoapps/discussion/notification_prefs/tests.py
+2
-1
2 additions, 1 deletion
lms/djangoapps/discussion/notification_prefs/tests.py
lms/djangoapps/instructor_task/api_helper.py
+1
-1
1 addition, 1 deletion
lms/djangoapps/instructor_task/api_helper.py
with
3 additions
and
2 deletions
lms/djangoapps/discussion/notification_prefs/tests.py
+
2
−
1
View file @
f528e31b
...
...
@@ -3,6 +3,7 @@ from __future__ import absolute_import
import
json
import
six
from
django.contrib.auth.models
import
AnonymousUser
from
django.core.exceptions
import
PermissionDenied
from
django.http
import
Http404
...
...
@@ -61,7 +62,7 @@ class NotificationPrefViewTest(UrlResetMixin, TestCase):
# now coerce username to utf-8 encoded str, since we test with non-ascii unicdoe above and
# the unittest framework has hard time coercing to unicode.
# decrypt also can't take a unicode input, so coerce its input to str
self
.
assertEqual
(
s
tr
(
user
.
username
.
encode
(
'
utf-8
'
)),
UsernameCipher
().
decrypt
(
str
(
pref
.
value
)))
self
.
assertEqual
(
s
ix
.
binary_type
(
user
.
username
.
encode
(
'
utf-8
'
)),
UsernameCipher
().
decrypt
(
str
(
pref
.
value
)))
def
assertNotPrefExists
(
self
,
user
):
"""
Ensure that the user does not have a persisted preference
"""
...
...
This diff is collapsed.
Click to expand it.
lms/djangoapps/instructor_task/api_helper.py
+
1
−
1
View file @
f528e31b
...
...
@@ -413,7 +413,7 @@ def encode_entrance_exam_and_student_input(usage_key, student=None):
task_key_stub
=
"
_{entranceexam}
"
.
format
(
entranceexam
=
text_type
(
usage_key
))
# create the key value by using MD5 hash:
task_key
=
hashlib
.
md5
(
task_key_stub
).
hexdigest
()
task_key
=
hashlib
.
md5
(
task_key_stub
.
encode
(
'
utf-8
'
)
).
hexdigest
()
return
task_input
,
task_key
...
...
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