コード例 #1
0
 def test_func_from_question(self):
     root = self.fixture()
     request = testing.DummyRequest()
     init_request_methods(request)
     request.root = root
     widget = self._fut(request, root['questions']['q1'])
     self.assertTrue(IQuestionWidget.providedBy(widget))
     self.assertEqual(widget.name, 'dropdown_choice_widget')
コード例 #2
0
 def test_func_from_question_type(self):
     root = self.fixture()
     request = testing.DummyRequest()
     widget = self._fut(request, root['qtypes']['qt1'])
     self.assertTrue(IQuestionWidget.providedBy(widget))
     self.assertEqual(widget.name, 'dropdown_choice_widget')