Commit 432c3d7d by Jim Abramson

Merge pull request #123 from edx/jsa/xcom-388

Pass mode when revoking course seat fulfillment.
parents 13e80d5a 2b697f4c
...@@ -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)
......
...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment