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
e43f1a8b
Commit
e43f1a8b
authored
Feb 07, 2015
by
Will Daly
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6923 from edx/will/clean-up-verification-exception
Remove submission of verification attempt in shopping cart
parents
55edd327
b59aa851
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
lms/djangoapps/shoppingcart/models.py
+0
-8
lms/djangoapps/shoppingcart/tests/test_models.py
+3
-1
No files found.
lms/djangoapps/shoppingcart/models.py
View file @
e43f1a8b
...
...
@@ -35,7 +35,6 @@ from edxmako.shortcuts import render_to_string
from
student.models
import
CourseEnrollment
,
UNENROLL_DONE
from
util.query
import
use_read_replica_if_available
from
xmodule_django.models
import
CourseKeyField
from
verify_student.models
import
SoftwareSecurePhotoVerification
from
.exceptions
import
(
InvalidCartItem
,
PurchasedCallbackException
,
...
...
@@ -1574,13 +1573,6 @@ class CertificateItem(OrderItem):
"""
When purchase goes through, activate and update the course enrollment for the correct mode
"""
try
:
verification_attempt
=
SoftwareSecurePhotoVerification
.
active_for_user
(
self
.
course_enrollment
.
user
)
verification_attempt
.
submit
()
except
Exception
:
log
.
exception
(
"Could not submit verification attempt for enrollment {}"
.
format
(
self
.
course_enrollment
)
)
self
.
course_enrollment
.
change_mode
(
self
.
mode
)
self
.
course_enrollment
.
activate
()
...
...
lms/djangoapps/shoppingcart/tests/test_models.py
View file @
e43f1a8b
...
...
@@ -12,6 +12,7 @@ from mock import patch, MagicMock
import
pytz
import
ddt
from
django.core
import
mail
from
django.core.mail.message
import
EmailMessage
from
django.conf
import
settings
from
django.db
import
DatabaseError
from
django.test
import
TestCase
...
...
@@ -298,7 +299,8 @@ class OrderTest(ModuleStoreTestCase):
def
test_purchase_item_email_boto_failure
(
self
,
error_logger
):
cart
=
Order
.
get_cart_for_user
(
user
=
self
.
user
)
CertificateItem
.
add_to_order
(
cart
,
self
.
course_key
,
self
.
cost
,
'honor'
)
with
patch
(
'shoppingcart.models.send_mail'
,
side_effect
=
BotoServerError
(
"status"
,
"reason"
)):
with
patch
.
object
(
EmailMessage
,
'send'
)
as
mock_send
:
mock_send
.
side_effect
=
BotoServerError
(
"status"
,
"reason"
)
cart
.
purchase
()
self
.
assertTrue
(
error_logger
.
called
)
...
...
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