Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
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
OpenEdx
problem-builder
Commits
934d768b
Commit
934d768b
authored
Jun 29, 2017
by
Douglas Cerna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Used messages content instead of labels
parent
bfa131b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
problem_builder/mentoring.py
+1
-1
problem_builder/tests/unit/test_problem_builder.py
+8
-8
No files found.
problem_builder/mentoring.py
View file @
934d768b
...
...
@@ -921,7 +921,7 @@ class MentoringBlock(BaseMentoringBlock, StudioContainerWithNestedXBlocksMixin,
'feedback_label'
:
self
.
feedback_label
,
'components'
:
components
,
'messages'
:
{
message_type
:
get_message_label
(
message_type
)
message_type
:
self
.
get_message_content
(
message_type
)
for
message_type
in
(
'completed'
,
'incomplete'
,
...
...
problem_builder/tests/unit/test_problem_builder.py
View file @
934d768b
...
...
@@ -127,19 +127,19 @@ class TestMentoringBlock(BlockWithChildrenTestMixin, unittest.TestCase):
block_data
=
{
'children'
:
children
}
block_data
.
update
(
shared_data
)
block
=
MentoringBlock
(
Mock
(),
DictFieldData
(
block_data
),
Mock
())
block
.
runtime
=
Mock
()
block
.
runtime
.
get_block
.
side_effect
=
lambda
child
:
children_by_id
[
child
.
block_id
]
block
.
runtime
=
Mock
(
get_block
=
lambda
block
:
children_by_id
[
block
.
block_id
],
load_block_type
=
lambda
block
:
Mock
,
id_reader
=
Mock
(
get_definition_id
=
lambda
block
:
block
,
get_block_type
=
lambda
block
:
block
),
)
expected
=
{
'components'
:
[
'child_a_json'
,
],
'messages'
:
{
message_type
:
MentoringMessageBlock
.
MESSAGE_TYPES
[
message_type
][
'studio_label'
]
for
message_type
in
(
'completed'
,
'incomplete'
,
'max_attempts_reached'
,
)
'completed'
:
None
,
'incomplete'
:
None
,
'max_attempts_reached'
:
None
,
}
}
expected
.
update
(
shared_data
)
...
...
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