Skip to content

Commit

Permalink
test: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharis278 committed Feb 6, 2024
1 parent b68970d commit b11a21f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion common/djangoapps/student/tests/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,21 @@ def test_unenrollment_completed_event_emitted(self):
)


@skip_unless_lms
@ddt.ddt
class TestCourseAccessRoleEvents(TestCase):
class TestCourseAccessRoleEvents(TestCase, OpenEdxEventsTestMixin):
"""
Tests for the events associated with the CourseAccessRole model.
"""
ENABLED_OPENEDX_EVENTS = [
'org.openedx.learning.user.course_access_role.added.v1',
'org.openedx.learning.user.course_access_role.removed.v1',
]

@classmethod
def setUpClass(cls):
super().setUpClass()
cls.start_events_isolation()

def setUp(self):
self.course_key = CourseKey.from_string("course-v1:test+blah+blah")
Expand Down Expand Up @@ -419,6 +429,7 @@ def test_access_role_created_event_emitted(self, AccessRole):
role = AccessRole(self.course_key)
role.add_users(self.user)

event_receiver.assert_called_once()
self.assertTrue(self.receiver_called)
self.assertDictContainsSubset(
{
Expand Down

0 comments on commit b11a21f

Please sign in to comment.