fix: delete flaky TestGetCourseUserPartitions tests (#35029)

The following TestGetCourseUserPartitions tests were deleted:
- test_enrollment_track_partition_not_added_if_conflict
- test_enrollment_track_partition_not_added_if_disabled

For details, see:
https://github.com/openedx/edx-platform/issues/35028
This commit is contained in:
Robert Raposa
2024-06-24 17:22:04 -04:00
committed by GitHub
parent 4fd60c4536
commit c596736117

View File

@@ -14,7 +14,6 @@ from stevedore.extension import Extension, ExtensionManager
from openedx.features.content_type_gating.models import ContentTypeGatingConfig
from xmodule.partitions.partitions import (
ENROLLMENT_TRACK_PARTITION_ID,
USER_PARTITION_SCHEME_NAMESPACE,
Group,
NoSuchUserPartitionGroupError,
@@ -552,32 +551,6 @@ class TestGetCourseUserPartitions(PartitionServiceBaseClass):
"""
FEATURES['ENABLE_ENROLLMENT_TRACK_USER_PARTITION'] = enable
def test_enrollment_track_partition_not_added_if_conflict(self):
"""
Test that the dynamic enrollment track scheme is NOT added if a UserPartition exists with that ID.
"""
self.user_partition = UserPartition(
ENROLLMENT_TRACK_PARTITION_ID,
self.TEST_NAME,
self.TEST_DESCRIPTION,
self.TEST_GROUPS,
self.non_random_scheme,
self.TEST_PARAMETERS,
)
self.course.user_partitions = [self.user_partition]
all_partitions = get_all_partitions_for_course(self.course)
assert 1 == len(all_partitions)
assert self.TEST_SCHEME_NAME == all_partitions[0].scheme.name
def test_enrollment_track_partition_not_added_if_disabled(self):
"""
Test that the dynamic enrollment track scheme is NOT added if the settings FEATURE flag is disabled.
"""
TestGetCourseUserPartitions._enable_enrollment_track_partition(False)
all_partitions = get_all_partitions_for_course(self.course)
assert 1 == len(all_partitions)
assert self.TEST_SCHEME_NAME == all_partitions[0].scheme.name
def test_filter_inactive_user_partitions(self):
"""
Tests supplying the `active_only` parameter.