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
d5376e71
Commit
d5376e71
authored
Mar 29, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add in a test for the weight field
parent
5391cefd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
+12
-11
No files found.
common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
View file @
d5376e71
...
...
@@ -353,10 +353,14 @@ class CombinedOpenEndedModuleTest(unittest.TestCase):
</openended>'''
definition
=
{
'prompt'
:
etree
.
XML
(
prompt
),
'rubric'
:
etree
.
XML
(
rubric
),
'task_xml'
:
[
task_xml1
,
task_xml2
]}
full_definition
=
definition_template
.
format
(
prompt
=
prompt
,
rubric
=
rubric
,
task1
=
task_xml1
,
task2
=
task_xml2
)
descriptor
=
Mock
()
descriptor
=
Mock
(
data
=
full_definition
)
test_system
=
test_system
()
combinedoe_container
=
CombinedOpenEndedModule
(
test_system
,
location
,
descriptor
,
model_data
=
{
'data'
:
full_definition
,
'weight'
:
'1'
})
def
setUp
(
self
):
self
.
test_system
=
test_system
()
# TODO: this constructor call is definitely wrong, but neither branch
# of the merge matches the module constructor. Someone (Vik?) should fix this.
self
.
combinedoe
=
CombinedOpenEndedV1Module
(
self
.
test_system
,
...
...
@@ -395,12 +399,10 @@ class CombinedOpenEndedModuleTest(unittest.TestCase):
self
.
assertEqual
(
max_score
,
1
)
def
test_container_get_max_score
(
self
):
definition
=
self
.
full_definition
descriptor
=
Mock
(
data
=
definition
)
combinedoe_container
=
CombinedOpenEndedModule
(
self
.
test_system
,
self
.
location
,
descriptor
,
model_data
=
{
'data'
:
definition
})
#The progress view requires that this function be exposed
max_score
=
combinedoe_container
.
max_score
()
self
.
assertEqual
(
max_score
,
None
)
\ No newline at end of file
max_score
=
self
.
combinedoe_container
.
max_score
()
self
.
assertEqual
(
max_score
,
None
)
def
test_container_weight
(
self
):
weight
=
self
.
combinedoe_container
.
weight
self
.
assertEqual
(
weight
,
1
)
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