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
fe4dc762
Commit
fe4dc762
authored
Jan 28, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates to combined open ended tests
parent
8d64bfdb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
+17
-4
No files found.
common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
View file @
fe4dc762
...
...
@@ -290,7 +290,7 @@ class CombinedOpenEndedModuleTest(unittest.TestCase):
</openendedparam>
'''
)
task_xml
=
'''
task_xml
1
=
'''
<selfassessment>
<hintprompt>
What hint about this problem would you give to someone?
...
...
@@ -300,7 +300,15 @@ class CombinedOpenEndedModuleTest(unittest.TestCase):
</submitmessage>
</selfassessment>
'''
definition
=
{
'prompt'
:
etree
.
XML
(
prompt
),
'rubric'
:
etree
.
XML
(
rubric
),
'task_xml'
:
[
task_xml
]}
task_xml2
=
'''
<openended min_score_to_attempt="1" max_score_to_attempt="1">
<openendedparam>
<initial_display>Enter essay here.</initial_display>
<answer_display>This is the answer.</answer_display>
<grader_payload>{"grader_settings" : "ml_grading.conf", "problem_id" : "6.002x/Welcome/OETest"}</grader_payload>
</openendedparam>
</openended>'''
definition
=
{
'prompt'
:
etree
.
XML
(
prompt
),
'rubric'
:
etree
.
XML
(
rubric
),
'task_xml'
:
[
task_xml1
,
task_xml2
]}
descriptor
=
Mock
()
def
setUp
(
self
):
...
...
@@ -320,7 +328,12 @@ class CombinedOpenEndedModuleTest(unittest.TestCase):
changed
=
self
.
combinedoe
.
update_task_states
()
self
.
assertFalse
(
changed
)
# do something to change the state
#prev_context = self.combinedoe.get_context()
#new_state = {'state': CombinedOpenEndedModule.INITIAL, 'history': []}
## force a task change
#task_state = self.combinedoe.overwrite_state(json.dumps(new_state))
# check again
## check again
#new_context = self.combinedoe.get_context()
#self.assertNotEqual(prev_context['state'], new_context['state'])
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