예제 #1
0
 def has_introduction(self):
     survey = aq_inner(self.context)
     return utils.HasText(getattr(survey, "introduction", None))
예제 #2
0
파일: module.py 프로젝트: euphorie/Euphorie
 def use_solution_direction(self):
     return utils.HasText(getattr(self.module, "solution_direction", None))
예제 #3
0
 def testWhitespaceInTag(self):
     self.assertEqual(utils.HasText("<strong>  </strong>"), False)
예제 #4
0
 def testTagsAndText(self):
     self.assertEqual(utils.HasText("<strong>STRONG</strong>"), True)
예제 #5
0
 def testTagsOnly(self):
     self.assertEqual(utils.HasText("<strong></strong>"), False)
예제 #6
0
 def testWhitespaceOnly(self):
     self.assertEqual(utils.HasText("   &nbsp;"), False)
예제 #7
0
 def testSimpleText(self):
     self.assertEqual(utils.HasText("Hello, World"), True)
예제 #8
0
 def testEmpty(self):
     self.assertEqual(utils.HasText(""), False)
예제 #9
0
 def testNone(self):
     self.assertEqual(utils.HasText(None), False)