-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[BD-32] feat: 1st batch of Open edX Events #28266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ | |
| import pytest | ||
| from django.conf import settings | ||
| from django.urls import reverse | ||
| from openedx_events.tests.utils import OpenEdxEventsTestMixin | ||
|
|
||
| from common.djangoapps.course_modes.models import CourseMode | ||
| from common.djangoapps.course_modes.tests.factories import CourseModeFactory | ||
|
|
@@ -30,19 +31,28 @@ | |
| @ddt.ddt | ||
| @patch.dict('django.conf.settings.FEATURES', {'ENABLE_SPECIAL_EXAMS': True}) | ||
| @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') | ||
| class EnrollmentTest(UrlResetMixin, SharedModuleStoreTestCase): | ||
| class EnrollmentTest(UrlResetMixin, SharedModuleStoreTestCase, OpenEdxEventsTestMixin): | ||
|
||
| """ | ||
| Test student enrollment, especially with different course modes. | ||
| """ | ||
|
|
||
| ENABLED_OPENEDX_EVENTS = [] | ||
|
|
||
| USERNAME = "Bob" | ||
| EMAIL = "bob@example.com" | ||
| PASSWORD = "edx" | ||
| URLCONF_MODULES = ['openedx.core.djangoapps.embargo'] | ||
|
|
||
| @classmethod | ||
| def setUpClass(cls): | ||
| """ | ||
| Set up class method for the Test class. | ||
|
|
||
| This method starts manually events isolation. Explanation here: | ||
| openedx/core/djangoapps/user_authn/views/tests/test_events.py#L44 | ||
| """ | ||
| super().setUpClass() | ||
| cls.start_events_isolation() | ||
| cls.course = CourseFactory.create() | ||
| cls.course_limited = CourseFactory.create() | ||
| cls.proctored_course = CourseFactory( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the abstraction layers that are being created for these data objects as part of this effort!