Commit 92d35e49 by dragonfi

Fix PR comments

parent 5a5c3c3c
......@@ -100,7 +100,7 @@ class LightChildrenMixin(XBlockWithChildrenFragmentsMixin):
@classmethod
def add_node_as_child(cls, block, xml_child, child_id):
if xml_child.tag is etree.Comment:
return
return
# Instantiate child
child_class = cls.get_class_by_element(xml_child.tag)
child = child_class(block)
......
......@@ -77,7 +77,7 @@ class QuestionnaireAbstractBlock(LightChild, StepMixin):
name = self.__class__.__name__
if str(self.type) not in self.valid_types:
raise ValueError('Invalid value for {}.type: `{}`'.format(name, self.type))
raise ValueError(u'Invalid value for {}.type: `{}`'.format(name, self.type))
template_path = 'templates/html/{}_{}.html'.format(name.lower(), self.type)
html = render_js_template(template_path, {
......
......@@ -53,10 +53,9 @@ class MentoringAssessmentTest(MentoringBaseTest):
@property
def state(self):
state = {}
for choice in self._mcq.find_elements_by_css_selector(".choice"):
state[choice.text] = choice.find_element_by_css_selector("input").is_selected()
return state
return {
choice.text: choice.find_element_by_css_selector("input").is_selected()
for choice in self._mcq.find_elements_by_css_selector(".choice")}
def select(self, text):
state = {}
......
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