Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
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-ora2
Commits
420f2a5f
Commit
420f2a5f
authored
Jan 02, 2015
by
Usman Khalid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests in test_peer.py and test_self.py
TNL-708
parent
94a2abf6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
120 additions
and
76 deletions
+120
-76
openassessment/xblock/test/data/peer_assessment_scenario.xml
+8
-5
openassessment/xblock/test/data/peer_closed_scenario.xml
+8
-5
openassessment/xblock/test/data/peer_future_scenario.xml
+8
-5
openassessment/xblock/test/data/peer_only_scenario.xml
+8
-5
openassessment/xblock/test/data/self_assessment_closed.xml
+8
-5
openassessment/xblock/test/data/self_assessment_open.xml
+8
-5
openassessment/xblock/test/data/self_assessment_scenario.xml
+8
-5
openassessment/xblock/test/data/self_assessment_unavailable.xml
+8
-5
openassessment/xblock/test/data/self_only_scenario.xml
+8
-5
openassessment/xblock/test/data/self_then_peer.xml
+8
-5
openassessment/xblock/test/test_peer.py
+33
-19
openassessment/xblock/test/test_self.py
+7
-7
No files found.
openassessment/xblock/test/data/peer_assessment_scenario.xml
View file @
420f2a5f
<openassessment>
<openassessment>
<title>
Open Assessment Test
</title>
<title>
Open Assessment Test
</title>
<prompt>
<prompts>
Given the state of the world today, what do you think should be done to
<prompt>
combat poverty? Please answer in a short essay of 200-300 words.
<description>
Given the state of the world today, what do you think should be done to combat poverty?
</description>
</prompt>
</prompt>
<prompt>
<description>
Given the state of the world today, what do you think should be done to combat pollution?
</description>
</prompt>
</prompts>
<rubric>
<rubric>
<prompt>
Read for conciseness, clarity of thought, and form.
</prompt>
<criterion>
<criterion>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<prompt>
How concise is it?
</prompt>
<prompt>
How concise is it?
</prompt>
...
...
openassessment/xblock/test/data/peer_closed_scenario.xml
View file @
420f2a5f
<openassessment>
<openassessment>
<title>
Open Assessment Test
</title>
<title>
Open Assessment Test
</title>
<prompt>
<prompts>
Given the state of the world today, what do you think should be done to
<prompt>
combat poverty? Please answer in a short essay of 200-300 words.
<description>
Given the state of the world today, what do you think should be done to combat poverty?
</description>
</prompt>
</prompt>
<prompt>
<description>
Given the state of the world today, what do you think should be done to combat pollution?
</description>
</prompt>
</prompts>
<rubric>
<rubric>
<prompt>
Read for conciseness, clarity of thought, and form.
</prompt>
<criterion>
<criterion>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<prompt>
How concise is it?
</prompt>
<prompt>
How concise is it?
</prompt>
...
...
openassessment/xblock/test/data/peer_future_scenario.xml
View file @
420f2a5f
<openassessment>
<openassessment>
<title>
Open Assessment Test
</title>
<title>
Open Assessment Test
</title>
<prompt>
<prompts>
Given the state of the world today, what do you think should be done to
<prompt>
combat poverty? Please answer in a short essay of 200-300 words.
<description>
Given the state of the world today, what do you think should be done to combat poverty?
</description>
</prompt>
</prompt>
<prompt>
<description>
Given the state of the world today, what do you think should be done to combat pollution?
</description>
</prompt>
</prompts>
<rubric>
<rubric>
<prompt>
Read for conciseness, clarity of thought, and form.
</prompt>
<criterion>
<criterion>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<prompt>
How concise is it?
</prompt>
<prompt>
How concise is it?
</prompt>
...
...
openassessment/xblock/test/data/peer_only_scenario.xml
View file @
420f2a5f
<openassessment>
<openassessment>
<title>
Open Assessment Test
</title>
<title>
Open Assessment Test
</title>
<prompt>
<prompts>
Given the state of the world today, what do you think should be done to
<prompt>
combat poverty? Please answer in a short essay of 200-300 words.
<description>
Given the state of the world today, what do you think should be done to combat poverty?
</description>
</prompt>
</prompt>
<prompt>
<description>
Given the state of the world today, what do you think should be done to combat pollution?
</description>
</prompt>
</prompts>
<rubric>
<rubric>
<prompt>
Read for conciseness, clarity of thought, and form.
</prompt>
<criterion>
<criterion>
<name>
Concise
</name>
<name>
Concise
</name>
<prompt>
How concise is it?
</prompt>
<prompt>
How concise is it?
</prompt>
...
...
openassessment/xblock/test/data/self_assessment_closed.xml
View file @
420f2a5f
<openassessment>
<openassessment>
<title>
Open Assessment Test
</title>
<title>
Open Assessment Test
</title>
<prompt>
<prompts>
Given the state of the world today, what do you think should be done to
<prompt>
combat poverty? Please answer in a short essay of 200-300 words.
<description>
Given the state of the world today, what do you think should be done to combat poverty?
</description>
</prompt>
</prompt>
<prompt>
<description>
Given the state of the world today, what do you think should be done to combat pollution?
</description>
</prompt>
</prompts>
<rubric>
<rubric>
<prompt>
Read for conciseness, clarity of thought, and form.
</prompt>
<criterion>
<criterion>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<prompt>
How concise is it?
</prompt>
<prompt>
How concise is it?
</prompt>
...
...
openassessment/xblock/test/data/self_assessment_open.xml
View file @
420f2a5f
<openassessment>
<openassessment>
<title>
Open Assessment Test
</title>
<title>
Open Assessment Test
</title>
<prompt>
<prompts>
Given the state of the world today, what do you think should be done to
<prompt>
combat poverty? Please answer in a short essay of 200-300 words.
<description>
Given the state of the world today, what do you think should be done to combat poverty?
</description>
</prompt>
</prompt>
<prompt>
<description>
Given the state of the world today, what do you think should be done to combat pollution?
</description>
</prompt>
</prompts>
<rubric>
<rubric>
<prompt>
Read for conciseness, clarity of thought, and form.
</prompt>
<criterion>
<criterion>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<prompt>
How concise is it?
</prompt>
<prompt>
How concise is it?
</prompt>
...
...
openassessment/xblock/test/data/self_assessment_scenario.xml
View file @
420f2a5f
<openassessment>
<openassessment>
<title>
Open Assessment Test
</title>
<title>
Open Assessment Test
</title>
<prompt>
<prompts>
Given the state of the world today, what do you think should be done to
<prompt>
combat poverty? Please answer in a short essay of 200-300 words.
<description>
Given the state of the world today, what do you think should be done to combat poverty?
</description>
</prompt>
</prompt>
<prompt>
<description>
Given the state of the world today, what do you think should be done to combat pollution?
</description>
</prompt>
</prompts>
<rubric>
<rubric>
<prompt>
Read for conciseness, clarity of thought, and form.
</prompt>
<criterion>
<criterion>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<prompt>
How concise is it?
</prompt>
<prompt>
How concise is it?
</prompt>
...
...
openassessment/xblock/test/data/self_assessment_unavailable.xml
View file @
420f2a5f
<openassessment>
<openassessment>
<title>
Open Assessment Test
</title>
<title>
Open Assessment Test
</title>
<prompt>
<prompts>
Given the state of the world today, what do you think should be done to
<prompt>
combat poverty? Please answer in a short essay of 200-300 words.
<description>
Given the state of the world today, what do you think should be done to combat poverty?
</description>
</prompt>
</prompt>
<prompt>
<description>
Given the state of the world today, what do you think should be done to combat pollution?
</description>
</prompt>
</prompts>
<rubric>
<rubric>
<prompt>
Read for conciseness, clarity of thought, and form.
</prompt>
<criterion>
<criterion>
<name>
Concise
</name>
<name>
Concise
</name>
<prompt>
How concise is it?
</prompt>
<prompt>
How concise is it?
</prompt>
...
...
openassessment/xblock/test/data/self_only_scenario.xml
View file @
420f2a5f
<openassessment>
<openassessment>
<title>
Open Assessment Test
</title>
<title>
Open Assessment Test
</title>
<prompt>
<prompts>
Given the state of the world today, what do you think should be done to
<prompt>
combat poverty? Please answer in a short essay of 200-300 words.
<description>
Given the state of the world today, what do you think should be done to combat poverty?
</description>
</prompt>
</prompt>
<prompt>
<description>
Given the state of the world today, what do you think should be done to combat pollution?
</description>
</prompt>
</prompts>
<rubric>
<rubric>
<prompt>
Read for conciseness, clarity of thought, and form.
</prompt>
<criterion>
<criterion>
<name>
Concise
</name>
<name>
Concise
</name>
<prompt>
How concise is it?
</prompt>
<prompt>
How concise is it?
</prompt>
...
...
openassessment/xblock/test/data/self_then_peer.xml
View file @
420f2a5f
<openassessment>
<openassessment>
<title>
Open Assessment Test
</title>
<title>
Open Assessment Test
</title>
<prompt>
<prompts>
Given the state of the world today, what do you think should be done to
<prompt>
combat poverty? Please answer in a short essay of 200-300 words.
<description>
Given the state of the world today, what do you think should be done to combat poverty?
</description>
</prompt>
</prompt>
<prompt>
<description>
Given the state of the world today, what do you think should be done to combat pollution?
</description>
</prompt>
</prompts>
<rubric>
<rubric>
<prompt>
Read for conciseness, clarity of thought, and form.
</prompt>
<criterion>
<criterion>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<prompt>
How concise is it?
</prompt>
<prompt>
How concise is it?
</prompt>
...
...
openassessment/xblock/test/test_peer.py
View file @
420f2a5f
This diff is collapsed.
Click to expand it.
openassessment/xblock/test/test_self.py
View file @
420f2a5f
...
@@ -20,7 +20,7 @@ class TestSelfAssessment(XBlockHandlerTestCase):
...
@@ -20,7 +20,7 @@ class TestSelfAssessment(XBlockHandlerTestCase):
maxDiff
=
None
maxDiff
=
None
SUBMISSION
=
u'ՇﻉรՇ รપ๒๓ٱรรٱѻก'
SUBMISSION
=
(
u'ՇﻉรՇ'
,
u'รપ๒๓ٱรรٱѻก'
)
ASSESSMENT
=
{
ASSESSMENT
=
{
'options_selected'
:
{
u'𝓒𝓸𝓷𝓬𝓲𝓼𝓮'
:
u'ﻉซƈﻉɭɭﻉกՇ'
,
u'Form'
:
u'Fair'
},
'options_selected'
:
{
u'𝓒𝓸𝓷𝓬𝓲𝓼𝓮'
:
u'ﻉซƈﻉɭɭﻉกՇ'
,
u'Form'
:
u'Fair'
},
...
@@ -236,7 +236,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
...
@@ -236,7 +236,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
def
test_open_done_status
(
self
,
xblock
):
def
test_open_done_status
(
self
,
xblock
):
# Simulate the workflow status being "done"
# Simulate the workflow status being "done"
xblock
.
create_submission
(
xblock
.
create_submission
(
xblock
.
get_student_item_dict
(),
u"Ⱥɨn'ŧ ɨŧ fᵾnꝁɏ"
xblock
.
get_student_item_dict
(),
(
u"Ⱥɨn'ŧ ɨŧ fᵾnꝁɏ 1"
,
u"Ⱥɨn'ŧ ɨŧ fᵾnꝁɏ 2"
)
)
)
self
.
_assert_path_and_context
(
self
.
_assert_path_and_context
(
xblock
,
'openassessmentblock/self/oa_self_complete.html'
,
{
'allow_latex'
:
False
},
xblock
,
'openassessmentblock/self/oa_self_complete.html'
,
{
'allow_latex'
:
False
},
...
@@ -258,7 +258,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
...
@@ -258,7 +258,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
def
test_open_self_assessing
(
self
,
xblock
):
def
test_open_self_assessing
(
self
,
xblock
):
# Simulate the workflow being in the self assessment step
# Simulate the workflow being in the self assessment step
submission
=
xblock
.
create_submission
(
submission
=
xblock
.
create_submission
(
xblock
.
get_student_item_dict
(),
u"Đøɨn' ɨŧ ŧø đɇȺŧħ"
xblock
.
get_student_item_dict
(),
(
u"Đøɨn' ɨŧ ŧø đɇȺŧħ 1"
,
u"Đøɨn' ɨŧ ŧø đɇȺŧħ 2"
)
)
)
self
.
_assert_path_and_context
(
self
.
_assert_path_and_context
(
xblock
,
'openassessmentblock/self/oa_self_assessment.html'
,
xblock
,
'openassessmentblock/self/oa_self_assessment.html'
,
...
@@ -279,7 +279,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
...
@@ -279,7 +279,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
# Simulate the workflow being in the self assessment step
# Simulate the workflow being in the self assessment step
# and we've created a self-assessment
# and we've created a self-assessment
submission
=
xblock
.
create_submission
(
submission
=
xblock
.
create_submission
(
xblock
.
get_student_item_dict
(),
u"Đøɨn' ɨŧ ŧø đɇȺŧħ"
xblock
.
get_student_item_dict
(),
(
u"Đøɨn' ɨŧ ŧø đɇȺŧħ 1"
,
u"Đøɨn' ɨŧ ŧø đɇȺŧħ 2"
)
)
)
self_api
.
create_assessment
(
self_api
.
create_assessment
(
submission
[
'uuid'
],
submission
[
'uuid'
],
...
@@ -299,7 +299,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
...
@@ -299,7 +299,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
# Simulate the workflow being in the self assessment step
# Simulate the workflow being in the self assessment step
# Since we're past the due date, the step should appear closed.
# Since we're past the due date, the step should appear closed.
submission
=
xblock
.
create_submission
(
submission
=
xblock
.
create_submission
(
xblock
.
get_student_item_dict
(),
u"Đøɨn' ɨŧ ŧø đɇȺŧħ"
xblock
.
get_student_item_dict
(),
(
u"Đøɨn' ɨŧ ŧø đɇȺŧħ 1"
,
u"Đøɨn' ɨŧ ŧø đɇȺŧħ 2"
)
)
)
self
.
_assert_path_and_context
(
self
.
_assert_path_and_context
(
xblock
,
xblock
,
...
@@ -315,7 +315,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
...
@@ -315,7 +315,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
# Even though the problem is closed, we should still see
# Even though the problem is closed, we should still see
# that we completed the step.
# that we completed the step.
submission
=
xblock
.
create_submission
(
submission
=
xblock
.
create_submission
(
xblock
.
get_student_item_dict
(),
u"Đøɨn' ɨŧ ŧø đɇȺŧħ"
xblock
.
get_student_item_dict
(),
(
u"Đøɨn' ɨŧ ŧø đɇȺŧħ 1"
,
u"Đøɨn' ɨŧ ŧø đɇȺŧħ 2"
)
)
)
self_api
.
create_assessment
(
self_api
.
create_assessment
(
submission
[
'uuid'
],
submission
[
'uuid'
],
...
@@ -341,7 +341,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
...
@@ -341,7 +341,7 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
# Simulate the workflow being in the self assessment step
# Simulate the workflow being in the self assessment step
# and we've created a self-assessment
# and we've created a self-assessment
submission
=
xblock
.
create_submission
(
submission
=
xblock
.
create_submission
(
xblock
.
get_student_item_dict
(),
u"Test submission"
xblock
.
get_student_item_dict
(),
(
u"Test submission 1"
,
u"Test submission 2"
)
)
)
xblock
.
get_workflow_info
=
mock
.
Mock
(
return_value
=
{
xblock
.
get_workflow_info
=
mock
.
Mock
(
return_value
=
{
...
...
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