Skip to content

Commit c596736

Browse files
authored
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: #35028
1 parent 4fd60c4 commit c596736

1 file changed

Lines changed: 0 additions & 27 deletions

File tree

xmodule/partitions/tests/test_partitions.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
from openedx.features.content_type_gating.models import ContentTypeGatingConfig
1616
from xmodule.partitions.partitions import (
17-
ENROLLMENT_TRACK_PARTITION_ID,
1817
USER_PARTITION_SCHEME_NAMESPACE,
1918
Group,
2019
NoSuchUserPartitionGroupError,
@@ -552,32 +551,6 @@ def _enable_enrollment_track_partition(enable):
552551
"""
553552
FEATURES['ENABLE_ENROLLMENT_TRACK_USER_PARTITION'] = enable
554553

555-
def test_enrollment_track_partition_not_added_if_conflict(self):
556-
"""
557-
Test that the dynamic enrollment track scheme is NOT added if a UserPartition exists with that ID.
558-
"""
559-
self.user_partition = UserPartition(
560-
ENROLLMENT_TRACK_PARTITION_ID,
561-
self.TEST_NAME,
562-
self.TEST_DESCRIPTION,
563-
self.TEST_GROUPS,
564-
self.non_random_scheme,
565-
self.TEST_PARAMETERS,
566-
)
567-
self.course.user_partitions = [self.user_partition]
568-
all_partitions = get_all_partitions_for_course(self.course)
569-
assert 1 == len(all_partitions)
570-
assert self.TEST_SCHEME_NAME == all_partitions[0].scheme.name
571-
572-
def test_enrollment_track_partition_not_added_if_disabled(self):
573-
"""
574-
Test that the dynamic enrollment track scheme is NOT added if the settings FEATURE flag is disabled.
575-
"""
576-
TestGetCourseUserPartitions._enable_enrollment_track_partition(False)
577-
all_partitions = get_all_partitions_for_course(self.course)
578-
assert 1 == len(all_partitions)
579-
assert self.TEST_SCHEME_NAME == all_partitions[0].scheme.name
580-
581554
def test_filter_inactive_user_partitions(self):
582555
"""
583556
Tests supplying the `active_only` parameter.

0 commit comments

Comments
 (0)