Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
ecommerce
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
ecommerce
Commits
432c3d7d
Commit
432c3d7d
authored
Jun 04, 2015
by
Jim Abramson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #123 from edx/jsa/xcom-388
Pass mode when revoking course seat fulfillment.
parents
13e80d5a
2b697f4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
ecommerce/extensions/fulfillment/modules.py
+3
-2
ecommerce/extensions/fulfillment/tests/test_modules.py
+6
-5
No files found.
ecommerce/extensions/fulfillment/modules.py
View file @
432c3d7d
...
@@ -204,9 +204,10 @@ class EnrollmentFulfillmentModule(BaseFulfillmentModule):
...
@@ -204,9 +204,10 @@ class EnrollmentFulfillmentModule(BaseFulfillmentModule):
data
=
{
data
=
{
'user'
:
line
.
order
.
user
.
username
,
'user'
:
line
.
order
.
user
.
username
,
'is_active'
:
False
,
'is_active'
:
False
,
'mode'
:
line
.
product
.
attr
.
certificate_type
,
'course_details'
:
{
'course_details'
:
{
'course_id'
:
line
.
product
.
attr
.
course_key
'course_id'
:
line
.
product
.
attr
.
course_key
,
}
}
,
}
}
response
=
self
.
_post_to_enrollment_api
(
data
)
response
=
self
.
_post_to_enrollment_api
(
data
)
...
...
ecommerce/extensions/fulfillment/tests/test_modules.py
View file @
432c3d7d
...
@@ -28,13 +28,13 @@ User = get_user_model()
...
@@ -28,13 +28,13 @@ User = get_user_model()
class
EnrollmentFulfillmentModuleTests
(
CourseCatalogTestMixin
,
FulfillmentTestMixin
,
TestCase
):
class
EnrollmentFulfillmentModuleTests
(
CourseCatalogTestMixin
,
FulfillmentTestMixin
,
TestCase
):
"""Test course seat fulfillment."""
"""Test course seat fulfillment."""
course_id
=
'edX/DemoX/Demo_Course'
course_id
=
'edX/DemoX/Demo_Course'
certificate_type
=
'test-certificate-type'
def
setUp
(
self
):
def
setUp
(
self
):
user
=
UserFactory
()
user
=
UserFactory
()
certificate_type
=
'honor'
seats
=
self
.
create_course_seats
(
self
.
course_id
,
(
self
.
certificate_type
,))
seats
=
self
.
create_course_seats
(
self
.
course_id
,
(
certificate_type
,))
self
.
seat
=
seats
[
self
.
certificate_type
]
self
.
seat
=
seats
[
certificate_type
]
for
stock_record
in
self
.
seat
.
stockrecords
.
all
():
for
stock_record
in
self
.
seat
.
stockrecords
.
all
():
stock_record
.
price_currency
=
'USD'
stock_record
.
price_currency
=
'USD'
...
@@ -103,9 +103,10 @@ class EnrollmentFulfillmentModuleTests(CourseCatalogTestMixin, FulfillmentTestMi
...
@@ -103,9 +103,10 @@ class EnrollmentFulfillmentModuleTests(CourseCatalogTestMixin, FulfillmentTestMi
expected
=
{
expected
=
{
'user'
:
self
.
order
.
user
.
username
,
'user'
:
self
.
order
.
user
.
username
,
'is_active'
:
False
,
'is_active'
:
False
,
'mode'
:
self
.
certificate_type
,
'course_details'
:
{
'course_details'
:
{
'course_id'
:
self
.
course_id
'course_id'
:
self
.
course_id
,
}
}
,
}
}
self
.
assertEqual
(
actual
,
expected
)
self
.
assertEqual
(
actual
,
expected
)
...
...
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