Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ydidwania committed Aug 15, 2019
1 parent 42240bc commit 1366722
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions voluptuous/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,10 @@ class Union(_WithSubValidators):
>>> validate = Schema(Union({'type':'a', 'a_val':'1'},{'type':'b', 'b_val':'2'},
... discriminant=lambda val, alt: filter(
... lambda v : v['type'] == val['type'] , alt)))
>>> validate({'type':'a', 'val':'1'})
True
>>> validate({'type':'a', 'a_val':'1'})
{'a_val': '1', 'type': 'a'}
>>> with raises(MultipleInvalid, "not a valid value for dictionary value @ data['b_val']"):
... validate({'type':'b', 'a_val':'5'})
... validate({'type':'b', 'b_val':'5'})
```discriminant({'type':'b', 'a_val':'5'}, [{'type':'a', 'a_val':'1'},{'type':'b', 'b_val':'2'}])``` is invoked
Expand Down

0 comments on commit 1366722

Please sign in to comment.