Commit 327f7499 by Brad Melin

Add simple test to increase coverage and ensure that the required keys are always returned

parent 4c5efa34
......@@ -7,12 +7,27 @@ from random import random
from xblock.field_data import DictFieldData
from problem_builder.mcq import MCQBlock
from problem_builder.mrq import MRQBlock
from problem_builder.mentoring import MentoringBlock, MentoringMessageBlock, _default_options_config
from .utils import BlockWithChildrenTestMixin
@ddt.ddt
class TestMRQBlock(BlockWithChildrenTestMixin, unittest.TestCase):
def test_student_view_data(self):
"""
Ensure that all expected fields are always returned.
"""
block = MRQBlock(Mock(), DictFieldData({}), Mock())
self.assertListEqual(
block.student_view_data().keys(),
['hide_results', 'tips', 'weight', 'title', 'question', 'message', 'type', 'id', 'choices'])
@ddt.ddt
class TestMentoringBlock(BlockWithChildrenTestMixin, unittest.TestCase):
def test_sends_progress_event_when_rendered_student_view_with_display_submit_false(self):
block = MentoringBlock(MagicMock(), DictFieldData({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment