Commit d445c235 by Christina Roberts Committed by GitHub

Merge pull request #14802 from edx/christina/mockpartitionscheme

Remove dependency on test_partitions.
parents 8249f33c ec519436
......@@ -24,7 +24,6 @@ from opaque_keys.edx.locator import CourseLocator
from pymongo import MongoClient, ASCENDING
from openedx.core.lib.tests.assertions.events import assert_event_matches, is_matching_event, EventMatchTolerates
from xmodule.partitions.partitions import UserPartition
from xmodule.partitions.tests.test_partitions import MockUserPartitionScheme
from selenium.common.exceptions import StaleElementReferenceException
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.select import Select
......@@ -831,8 +830,12 @@ def create_user_partition_json(partition_id, name, description, groups, scheme="
"""
Helper method to create user partition JSON. If scheme is not supplied, "random" is used.
"""
# All that is persisted about a scheme is its name.
class MockScheme(object):
name = scheme
return UserPartition(
partition_id, name, description, groups, MockUserPartitionScheme(scheme)
partition_id, name, description, groups, MockScheme()
).to_json()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment