Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
2337b80a
Commit
2337b80a
authored
Jun 13, 2016
by
Cliff Dyer
Committed by
GitHub
Jun 13, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12722 from edx/tnl/splittest-zerogroup-test
modified tests to directly address split test group 0 issues.
parents
9eaa1acd
26966504
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
lms/djangoapps/course_blocks/transformers/tests/test_split_test.py
+12
-12
No files found.
lms/djangoapps/course_blocks/transformers/tests/test_split_test.py
View file @
2337b80a
...
...
@@ -31,7 +31,7 @@ class SplitTestTransformerTestCase(CourseStructureTestCase):
super
(
SplitTestTransformerTestCase
,
self
)
.
setUp
()
# Set up user partitions and groups.
self
.
groups
=
[
Group
(
1
,
'Group 1'
),
Group
(
2
,
'Group 2'
),
Group
(
3
,
'Group 3
'
)]
self
.
groups
=
[
Group
(
0
,
'Group 0'
),
Group
(
1
,
'Group 1'
),
Group
(
2
,
'Group 2
'
)]
self
.
split_test_user_partition_id
=
self
.
TEST_PARTITION_ID
self
.
split_test_user_partition
=
UserPartition
(
id
=
self
.
split_test_user_partition_id
,
...
...
@@ -105,9 +105,9 @@ class SplitTestTransformerTestCase(CourseStructureTestCase):
'metadata'
:
{
'category'
:
'split_test'
},
'user_partition_id'
:
self
.
TEST_PARTITION_ID
,
'group_id_to_child'
:
{
'
1
'
:
location
(
'E'
),
'
2
'
:
location
(
'F'
),
'
3
'
:
location
(
'G'
),
'
0
'
:
location
(
'E'
),
'
1
'
:
location
(
'F'
),
'
2
'
:
location
(
'G'
),
},
'#children'
:
[{
'#type'
:
'vertical'
,
'#ref'
:
'G'
}],
},
...
...
@@ -130,8 +130,8 @@ class SplitTestTransformerTestCase(CourseStructureTestCase):
'metadata'
:
{
'category'
:
'split_test'
},
'user_partition_id'
:
self
.
TEST_PARTITION_ID
,
'group_id_to_child'
:
{
'
2
'
:
location
(
'M'
),
'
3
'
:
location
(
'N'
),
'
1
'
:
location
(
'M'
),
'
2
'
:
location
(
'N'
),
},
'#parents'
:
[
'F'
],
'#children'
:
[
...
...
@@ -145,8 +145,8 @@ class SplitTestTransformerTestCase(CourseStructureTestCase):
'metadata'
:
{
'category'
:
'split_test'
},
'user_partition_id'
:
self
.
TEST_PARTITION_ID
,
'group_id_to_child'
:
{
'
1
'
:
location
(
'H'
),
'
2
'
:
location
(
'I'
),
'
0
'
:
location
(
'H'
),
'
1
'
:
location
(
'I'
),
},
'#children'
:
[
{
'#type'
:
'vertical'
,
'#ref'
:
'I'
},
...
...
@@ -172,15 +172,15 @@ class SplitTestTransformerTestCase(CourseStructureTestCase):
@ddt.data
(
# Note: Theoretically, block E should be accessible by users
# not in Group
1
, since there's an open path through block A.
# not in Group
0
, since there's an open path through block A.
# Since the split_test transformer automatically sets the block
# access on its children, it bypasses the paths via other
# parents. However, we don't think this is a use case we need to
# support for split_test components (since they are now deprecated
# in favor of content groups and user partitions).
(
1
,
(
'course'
,
'A'
,
'D'
,
'E'
,
'H'
,
'L'
,
'O'
,
'P'
,)),
(
2
,
(
'course'
,
'A'
,
'D'
,
'F'
,
'J'
,
'M'
,
'I'
,)),
(
3
,
(
'course'
,
'A'
,
'D'
,
'G'
,
'O'
,)),
(
0
,
(
'course'
,
'A'
,
'D'
,
'E'
,
'H'
,
'L'
,
'O'
,
'P'
,)),
(
1
,
(
'course'
,
'A'
,
'D'
,
'F'
,
'J'
,
'M'
,
'I'
,)),
(
2
,
(
'course'
,
'A'
,
'D'
,
'G'
,
'O'
,)),
)
@ddt.unpack
def
test_user
(
self
,
group_id
,
expected_blocks
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment