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
7699b5ff
Commit
7699b5ff
authored
Dec 16, 2014
by
Renzo Lucioni
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6273 from edx/renzo/fix-shoppingcart-tests
Fix unit test failure due to stale urls.py
parents
b4a8302e
cdcd5d79
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
lms/djangoapps/shoppingcart/models.py
+1
-1
lms/djangoapps/shoppingcart/tests/test_models.py
+7
-3
lms/djangoapps/verify_student/urls.py
+1
-1
No files found.
lms/djangoapps/shoppingcart/models.py
View file @
7699b5ff
...
...
@@ -1372,7 +1372,7 @@ class CertificateItem(OrderItem):
if
settings
.
FEATURES
.
get
(
'SEPARATE_VERIFICATION_FROM_PAYMENT'
):
domain
=
microsite
.
get_value
(
'SITE_NAME'
,
settings
.
SITE_NAME
)
path
=
reverse
(
'verify_student_verify_later'
,
args
=
[
unicode
(
self
.
course_id
)]
)
path
=
reverse
(
'verify_student_verify_later'
,
kwargs
=
{
'course_id'
:
unicode
(
self
.
course_id
)}
)
verification_url
=
"http://{domain}{path}"
.
format
(
domain
=
domain
,
path
=
path
)
verification_reminder
=
_
(
...
...
lms/djangoapps/shoppingcart/tests/test_models.py
View file @
7699b5ff
...
...
@@ -40,6 +40,7 @@ from shoppingcart.exceptions import (
)
from
opaque_keys.edx.locator
import
CourseLocator
from
util.testing
import
UrlResetMixin
# Since we don't need any XML course fixtures, use a modulestore configuration
# that disables the XML modulestore.
...
...
@@ -48,8 +49,11 @@ MODULESTORE_CONFIG = mixed_store_config(settings.COMMON_TEST_DATA_ROOT, {}, incl
@override_settings
(
MODULESTORE
=
MODULESTORE_CONFIG
)
@ddt.ddt
class
OrderTest
(
ModuleStoreTestCase
):
class
OrderTest
(
UrlResetMixin
,
ModuleStoreTestCase
):
@patch.dict
(
settings
.
FEATURES
,
{
'SEPARATE_VERIFICATION_FROM_PAYMENT'
:
True
})
def
setUp
(
self
):
super
(
OrderTest
,
self
)
.
setUp
(
'verify_student.urls'
)
self
.
user
=
UserFactory
.
create
()
course
=
CourseFactory
.
create
()
self
.
course_key
=
course
.
id
...
...
@@ -225,6 +229,7 @@ class OrderTest(ModuleStoreTestCase):
'STORE_BILLING_INFO'
:
True
,
}
)
@patch.dict
(
settings
.
FEATURES
,
{
'SEPARATE_VERIFICATION_FROM_PAYMENT'
:
False
})
def
test_purchase
(
self
):
# This test is for testing the subclassing functionality of OrderItem, but in
# order to do this, we end up testing the specific functionality of
...
...
@@ -248,7 +253,7 @@ class OrderTest(ModuleStoreTestCase):
# Assert Google Analytics event fired for purchase.
self
.
mock_tracker
.
track
.
assert_called_once_with
(
# pylint: disable=maybe-no-member
1
,
self
.
user
.
id
,
'Completed Order'
,
{
'orderId'
:
1
,
...
...
@@ -268,7 +273,6 @@ class OrderTest(ModuleStoreTestCase):
context
=
{
'Google Analytics'
:
{
'clientId'
:
None
}}
)
@patch.dict
(
settings
.
FEATURES
,
{
'SEPARATE_VERIFICATION_FROM_PAYMENT'
:
True
})
def
test_payment_separate_from_verification_email
(
self
):
cart
=
Order
.
get_cart_for_user
(
user
=
self
.
user
)
item
=
CertificateItem
.
add_to_order
(
cart
,
self
.
course_key
,
self
.
cost
,
'honor'
)
...
...
lms/djangoapps/verify_student/urls.py
View file @
7699b5ff
...
...
@@ -138,7 +138,7 @@ if settings.FEATURES.get("SEPARATE_VERIFICATION_FROM_PAYMENT"):
),
# The user has paid and still needs to verify,
# but the user is NOT arriving directly from the paymen
104gg
t flow.
# but the user is NOT arriving directly from the payment flow.
# This is equivalent to starting a new flow
# with the payment steps and requirements hidden
# (since the user already paid).
...
...
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