Example #1
0
 def test_list_n_or_more_invalid_data(self):
     self.expect_raises(valid.list_n_or_more(valid.int, 1), ['a',2], errors={0: ["invalid literal for int() with base 10: 'a'"]})
Example #2
0
 def test_list_n_or_more_more(self):
     self.expect(valid.list_n_or_more(valid.int, 1), [1,2])
Example #3
0
 def test_list_n_or_more_zero(self):
     self.expect_raises(valid.list_n_or_more(valid.int, 1), [], errors={'__nonindexerrors__': ['Expected list with 1 or more elements, saw 0']})
Example #4
0
 def test_list_n_or_more_invalid_data(self):
     self.expect_raises(valid.list_n_or_more(valid.int, 1), ['a',2], errors={0: ["invalid literal for int() with base 10: 'a'"]})
Example #5
0
 def test_list_n_or_more_more(self):
     self.expect(valid.list_n_or_more(valid.int, 1), [1,2])
Example #6
0
 def test_list_n_or_more_zero(self):
     self.expect_raises(valid.list_n_or_more(valid.int, 1), [], errors={'__nonindexerrors__': ['Expected list with 1 or more elements, saw 0']})