fixes issue #742

This commit is contained in:
niphlod
2015-02-23 21:34:23 +01:00
parent 8d83bb3076
commit 17f4e46423
2 changed files with 13 additions and 9 deletions
+4
View File
@@ -280,6 +280,10 @@ class TestValidators(unittest.TestCase):
self.assertEqual(rtn, ([1, 2], 'Enter between 10 and 100 values'))
rtn = IS_LIST_OF(IS_INT_IN_RANGE(0, 10), maximum=2)([1,2,3])
self.assertEqual(rtn, ([1, 2, 3], 'Enter between 0 and 2 values'))
# regression test for issue 742
rtn = IS_LIST_OF(minimum=1)('')
self.assertEqual(rtn, ([], 'Enter between 1 and 100 values'))
def test_IS_EMPTY_OR(self):
rtn = IS_EMPTY_OR(IS_EMAIL())('abc@def.com')