From c5967361176eb2cefb75bc2316e0ecb7a64a7cc5 Mon Sep 17 00:00:00 2001 From: Robert Raposa Date: Mon, 24 Jun 2024 17:22:04 -0400 Subject: [PATCH] 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 --- xmodule/partitions/tests/test_partitions.py | 27 --------------------- 1 file changed, 27 deletions(-) diff --git a/xmodule/partitions/tests/test_partitions.py b/xmodule/partitions/tests/test_partitions.py index bc8c74cd3485..fde6afd3141b 100644 --- a/xmodule/partitions/tests/test_partitions.py +++ b/xmodule/partitions/tests/test_partitions.py @@ -14,7 +14,6 @@ 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 @@ def _enable_enrollment_track_partition(enable): """ 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.