Skip to content

Commit

Permalink
failing test for enums with blank=True
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesturk committed Feb 19, 2015
1 parent 130ee29 commit 487fb71
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions validictory/tests/test_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ def test_enum_pass(self):
except ValueError as e:
self.fail("Unexpected failure: %s" % e)

def test_enum_blank(self):
blank_schema = {"enum": ("test", True, 123, ["???"]), "blank": True}
data = ["test", True, 123, ["???"], ""]
try:
for item in data:
validictory.validate(item, blank_schema)
except ValueError as e:
self.fail("Unexpected failure: %s" % e)

def test_enum_fail(self):
data = "unknown"

Expand Down

0 comments on commit 487fb71

Please sign in to comment.