def test_has_text_with_not_empty_unicode_string(self): self.assertTrue(has_text(u'a ')) self.assertTrue(has_text('a'))
def required_view_name(view_name): if not is_stringy(view_name): raise KrumpException('Required view name must be a string.') if not has_text(view_name): raise KrumpException('Required view name is empty.') return view_name
def test_has_text_with_string_filled_with_just_whitespace(self): self.assertFalse(has_text('\t '))
def test_has_text_with_unicode_string_filled_with_just_whitespace(self): self.assertFalse(has_text(u' '))
def test_has_text_with_empty_unicode_string(self): self.assertFalse(has_text(u''))
def test_has_text_with_empty_string(self): self.assertFalse(has_text(''))
def test_has_text_with_none(self): self.assertFalse(has_text(None))