From f59e7edb8f446d72ef3d5317ca5eedd7844d3710 Mon Sep 17 00:00:00 2001 From: Jason Bau Date: Wed, 21 Aug 2013 10:06:14 -0700 Subject: [PATCH] minor changes to PaidCourseRegistrationTest.test_purchased_callback --- lms/djangoapps/shoppingcart/tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/shoppingcart/tests.py b/lms/djangoapps/shoppingcart/tests.py index 5754d2173d..10b59deee6 100644 --- a/lms/djangoapps/shoppingcart/tests.py +++ b/lms/djangoapps/shoppingcart/tests.py @@ -131,8 +131,10 @@ class PaidCourseRegistrationTest(ModuleStoreTestCase): def test_purchased_callback(self): reg1 = PaidCourseRegistration.add_to_order(self.cart, self.course_id) - reg1.purchased_callback() + self.cart.purchase() self.assertTrue(CourseEnrollment.is_enrolled(self.user, self.course_id)) + reg1 = PaidCourseRegistration.objects.get(id=reg1.id) # reload from DB to get side-effect + self.assertEqual(reg1.status, "purchased") def test_purchased_callback_exception(self): reg1 = PaidCourseRegistration.add_to_order(self.cart, self.course_id)