Exemplo n.º 1
0
 def test_string_max_length_with_none(self):
     self.expect_raises(valid.string_max_length(1), None, errors=['string_or_none_no_none does not accept None'])
Exemplo n.º 2
0
 def test_string_max_length_over_limit(self):
     self.expect_raises(valid.string_max_length(1), 'aa', errors=['The value is greater than max length 1: 2'])
Exemplo n.º 3
0
 def test_string_max_length(self):
     self.expect(valid.string_max_length(1), '')
Exemplo n.º 4
0
 def test_string_max_length_with_none(self):
     self.expect_raises(valid.string_max_length(1), None, errors=['string_or_none_no_none does not accept None'])
Exemplo n.º 5
0
 def test_string_max_length_over_limit(self):
     self.expect_raises(valid.string_max_length(1), 'aa', errors=['The value is greater than max length 1: 2'])
Exemplo n.º 6
0
 def test_string_max_length(self):
     self.expect(valid.string_max_length(1), '')