def test_course_has_payment_options(self): # Has no payment options. honor, _ = self.create_mode('honor', 'Honor') assert not CourseMode.has_payment_options(self.course_key) # Now we do have a payment option. verified, _ = self.create_mode('verified', 'Verified', min_price=5) assert CourseMode.has_payment_options(self.course_key) # Remove the verified option. verified.delete() assert not CourseMode.has_payment_options(self.course_key) # Finally, give the honor mode payment options honor.suggested_prices = '5, 10, 15' honor.save() assert CourseMode.has_payment_options(self.course_key)
def test_course_has_payment_options_with_no_id_professional(self): # Has payment options. self.create_mode('no-id-professional', 'no-id-professional', min_price=5) assert CourseMode.has_payment_options(self.course_key)