Skip to content

Commit

Permalink
fix: delete flaky TestGetCourseUserPartitions tests (openedx#35029)
Browse files Browse the repository at this point in the history
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:
openedx#35028
  • Loading branch information
robrap committed Jun 24, 2024
1 parent 4fd60c4 commit c596736
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions xmodule/partitions/tests/test_partitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit c596736

Please sign in to comment.