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
90a57034
Commit
90a57034
authored
Jan 19, 2013
by
Victor Shnayder
Committed by
Victor Shnayder
Jan 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for cohort config
parent
f005b70f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
common/lib/xmodule/xmodule/tests/test_import.py
+25
-0
No files found.
common/lib/xmodule/xmodule/tests/test_import.py
View file @
90a57034
...
@@ -353,3 +353,28 @@ class ImportTestCase(unittest.TestCase):
...
@@ -353,3 +353,28 @@ class ImportTestCase(unittest.TestCase):
<slider var="a" style="width:400px;float:left;"/>
\
<slider var="a" style="width:400px;float:left;"/>
\
<plot style="margin-top:15px;margin-bottom:15px;"/>"""
.
strip
()
<plot style="margin-top:15px;margin-bottom:15px;"/>"""
.
strip
()
self
.
assertEqual
(
gst_sample
.
definition
[
'render'
],
render_string_from_sample_gst_xml
)
self
.
assertEqual
(
gst_sample
.
definition
[
'render'
],
render_string_from_sample_gst_xml
)
def
test_cohort_config
(
self
):
"""
Check that cohort config parsing works right.
"""
modulestore
=
XMLModuleStore
(
DATA_DIR
,
course_dirs
=
[
'toy'
])
toy_id
=
"edX/toy/2012_Fall"
course
=
modulestore
.
get_course
(
toy_id
)
# No config -> False
self
.
assertFalse
(
course
.
is_cohorted
)
# empty config -> False
course
.
metadata
[
'cohort-config'
]
=
{}
self
.
assertFalse
(
course
.
is_cohorted
)
# false config -> False
course
.
metadata
[
'cohort-config'
]
=
{
'cohorted'
:
False
}
self
.
assertFalse
(
course
.
is_cohorted
)
# and finally...
course
.
metadata
[
'cohort-config'
]
=
{
'cohorted'
:
True
}
self
.
assertTrue
(
course
.
is_cohorted
)
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