'Ensures an unenrollment event was emitted since the last event related assertion'

def assert_unenrollment_event_was_emitted(self, user, course_key):

    self.mock_tracker.emit.assert_called_once_with('edx.course.enrollment.deactivated', {'course_id': course_key.to_deprecated_string(), 'user_id': user.pk, 'mode': CourseMode.DEFAULT_MODE_SLUG})
    self.mock_tracker.reset_mock()
