def test_validate_string_or_none(self): msg = attributes._validate_not_empty_string_or_none('test', None) self.assertIsNone(msg) msg = attributes._validate_not_empty_string_or_none(None, None) self.assertIsNone(msg)
def test_validate_not_empty_string_or_none(self): msg = attributes._validate_not_empty_string_or_none(' ', None) self.assertEqual(u"' ' Blank strings are not permitted", msg) msg = attributes._validate_not_empty_string_or_none(None, None) self.assertIsNone(msg)