Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
d445c235
Commit
d445c235
authored
8 years ago
by
Christina Roberts
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #14802 from edx/christina/mockpartitionscheme
Remove dependency on test_partitions.
parents
8249f33c
ec519436
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/test/acceptance/tests/helpers.py
+5
-2
5 additions, 2 deletions
common/test/acceptance/tests/helpers.py
with
5 additions
and
2 deletions
common/test/acceptance/tests/helpers.py
+
5
−
2
View file @
d445c235
...
...
@@ -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
,
Mock
UserPartition
Scheme
(
scheme
)
partition_id
,
name
,
description
,
groups
,
MockScheme
()
).
to_json
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment