Пример #1
0
 def test_has_text_with_not_empty_unicode_string(self):
     self.assertTrue(has_text(u'a   '))
     self.assertTrue(has_text('a'))
Пример #2
0
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
Пример #3
0
 def test_has_text_with_string_filled_with_just_whitespace(self):
     self.assertFalse(has_text('\t    '))
Пример #4
0
 def test_has_text_with_unicode_string_filled_with_just_whitespace(self):
     self.assertFalse(has_text(u'    '))
Пример #5
0
 def test_has_text_with_empty_unicode_string(self):
     self.assertFalse(has_text(u''))
Пример #6
0
 def test_has_text_with_empty_string(self):
     self.assertFalse(has_text(''))
Пример #7
0
 def test_has_text_with_none(self):
     self.assertFalse(has_text(None))