feat: TNL-10136 tease course enrollment from student model
Reapply changes developed in bszabo/TNL-10136-student-course-enrollment branch to current master
This commit is contained in:
@@ -48,7 +48,7 @@ class CourseLiveTabTestCase(TabTestCase):
|
||||
)
|
||||
|
||||
@ddt.data(True, False)
|
||||
@patch('common.djangoapps.student.models.CourseEnrollment.is_enrolled', Mock(return_value=True))
|
||||
@patch('common.djangoapps.student.models.course_enrollment.CourseEnrollment.is_enrolled', Mock(return_value=True))
|
||||
def test_user_can_access_course_live_tab(self, course_live_config_enabled):
|
||||
"""
|
||||
Test if tab is accessible to users with different roles
|
||||
|
||||
@@ -133,7 +133,7 @@ class EnterpriseSupportSignals(SharedModuleStoreTestCase):
|
||||
|
||||
return enrollment
|
||||
|
||||
@patch('common.djangoapps.student.models.CourseEnrollment.is_order_voucher_refundable')
|
||||
@patch('common.djangoapps.student.models.course_enrollment.CourseEnrollment.is_order_voucher_refundable')
|
||||
@ddt.data(
|
||||
(True, True, 2, True, False), # test if skip_refund
|
||||
(False, True, 20, True, False), # test refundable time passed
|
||||
@@ -161,7 +161,7 @@ class EnterpriseSupportSignals(SharedModuleStoreTestCase):
|
||||
enrollment.update_enrollment(is_active=False, skip_refund=skip_refund)
|
||||
assert mock_ecommerce_api_client.called == api_called
|
||||
|
||||
@patch('common.djangoapps.student.models.CourseEnrollment.is_order_voucher_refundable')
|
||||
@patch('common.djangoapps.student.models.course_enrollment.CourseEnrollment.is_order_voucher_refundable')
|
||||
@ddt.data(
|
||||
(HttpClientError, 'INFO'),
|
||||
(HttpServerError, 'ERROR'),
|
||||
|
||||
@@ -45,7 +45,7 @@ class DiscussionLtiCourseTabTestCase(TabTestCase):
|
||||
)
|
||||
|
||||
@ddt.data(True, False)
|
||||
@patch('common.djangoapps.student.models.CourseEnrollment.is_enrolled', Mock(return_value=True))
|
||||
@patch('common.djangoapps.student.models.course_enrollment.CourseEnrollment.is_enrolled', Mock(return_value=True))
|
||||
def test_pii_params_on_discussion_lti_tab(self, discussion_config_enabled):
|
||||
self.discussion_config.enabled = discussion_config_enabled
|
||||
self.discussion_config.save()
|
||||
|
||||
Reference in New Issue
Block a user