Permalink
Browse files

Test blank validator for both None and empty string.

  • Loading branch information...
ralphbean committed Oct 14, 2012
1 parent bb5c2a2 commit 1167286c392b6dc7e0a09972006c4b8ae5a36300
Showing with 5 additions and 1 deletion.
  1. +5 −1 tests/test_validation.py
@@ -500,10 +500,14 @@ def testRequired(self):
except ValidationError, ve:
self.assert_(ve.message == v.msgs["required"], ve.message)
def testBlankValidator(self):
def testBlankValidatorNone(self):
v = BlankValidator()
self.assert_(v.to_python(None) == EmptyField)
def testBlankValidatorEmptyString(self):
v = BlankValidator()
self.assert_(v.to_python('') == EmptyField)
def testRangeValidator(self):
v = RangeValidator(min=0, max=2)
self.assert_(v.min is not None)

0 comments on commit 1167286

Please sign in to comment.