Beispiel #1
0
 def test_string_or_none_max_length_with_none(self):
     self.expect(valid.string_or_none_max_length(1), None)
Beispiel #2
0
 def test_string_or_none_max_length_over_limit(self):
     self.expect_raises(valid.string_or_none_max_length(1), 'aa', errors=['The value is greater than max length 1: 2'])
Beispiel #3
0
 def test_string_or_none_max_length(self):
     self.expect(valid.string_or_none_max_length(1), '')
Beispiel #4
0
 def test_string_or_none_max_length_with_none(self):
     self.expect(valid.string_or_none_max_length(1), None)
Beispiel #5
0
 def test_string_or_none_max_length_over_limit(self):
     self.expect_raises(valid.string_or_none_max_length(1), 'aa', errors=['The value is greater than max length 1: 2'])
Beispiel #6
0
 def test_string_or_none_max_length(self):
     self.expect(valid.string_or_none_max_length(1), '')