Commit 92d35e49 by dragonfi

Fix PR comments

parent 5a5c3c3c
...@@ -77,7 +77,7 @@ class QuestionnaireAbstractBlock(LightChild, StepMixin): ...@@ -77,7 +77,7 @@ class QuestionnaireAbstractBlock(LightChild, StepMixin):
name = self.__class__.__name__ name = self.__class__.__name__
if str(self.type) not in self.valid_types: 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) template_path = 'templates/html/{}_{}.html'.format(name.lower(), self.type)
html = render_js_template(template_path, { html = render_js_template(template_path, {
......
...@@ -53,10 +53,9 @@ class MentoringAssessmentTest(MentoringBaseTest): ...@@ -53,10 +53,9 @@ class MentoringAssessmentTest(MentoringBaseTest):
@property @property
def state(self): def state(self):
state = {} return {
for choice in self._mcq.find_elements_by_css_selector(".choice"): choice.text: choice.find_element_by_css_selector("input").is_selected()
state[choice.text] = choice.find_element_by_css_selector("input").is_selected() for choice in self._mcq.find_elements_by_css_selector(".choice")}
return state
def select(self, text): def select(self, text):
state = {} 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