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
a1a58db9
Commit
a1a58db9
authored
Feb 23, 2016
by
Bill DeRusha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not send initial verification photo_id if new photo_id provided
ECOM-2888
parent
03487073
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletions
+17
-1
lms/djangoapps/verify_student/tests/test_views.py
+12
-1
lms/djangoapps/verify_student/views.py
+5
-0
No files found.
lms/djangoapps/verify_student/tests/test_views.py
View file @
a1a58db9
...
...
@@ -1427,7 +1427,8 @@ class TestSubmitPhotosForVerification(TestCase):
"AWS_ACCESS_KEY"
:
"c987c7efe35c403caa821f7328febfa1"
,
"AWS_SECRET_KEY"
:
"fc595fc657c04437bb23495d8fe64881"
,
"S3_BUCKET"
:
"test.example.com"
,
}
},
"DAYS_GOOD_FOR"
:
10
,
})
@httpretty.activate
@moto.mock_s3
...
...
@@ -1470,6 +1471,16 @@ class TestSubmitPhotosForVerification(TestCase):
self
.
assertNotEqual
(
initial_photo_response
.
content
,
reverification_photo_response
.
content
)
# Submit a new face photo and photo id for verification
self
.
_submit_photos
(
face_image
=
self
.
IMAGE_DATA
+
"9999"
,
photo_id_image
=
self
.
IMAGE_DATA
+
"1111"
,
)
two_photo_reverification_data
=
self
.
_get_post_data
()
# Verify that the initial attempt sent a new ID photo for the reverification attempt
self
.
assertNotEqual
(
initial_data
[
"PhotoIDKey"
],
two_photo_reverification_data
[
"PhotoIDKey"
])
@ddt.data
(
'face_image'
,
'photo_id_image'
)
def
test_invalid_image_data
(
self
,
invalid_param
):
params
=
{
...
...
lms/djangoapps/verify_student/views.py
View file @
a1a58db9
...
...
@@ -872,6 +872,11 @@ class SubmitPhotosView(View):
face_image
,
photo_id_image
,
response
=
self
.
_decode_image_data
(
params
[
"face_image"
],
params
.
get
(
"photo_id_image"
)
)
# If we have a photo_id we do not want use the initial verification image.
if
photo_id_image
is
not
None
:
initial_verification
=
None
if
response
is
not
None
:
return
response
...
...
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