예제 #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))