Skip to content

Commit

Permalink
Fix tests for changes in zope.schema validation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli committed Sep 29, 2018
1 parent fc5108e commit 4421dc4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGES.txt
Expand Up @@ -5,7 +5,7 @@ CHANGES
3.6.1 (unreleased)
------------------

- Nothing changed yet.
- Fix tests for changes in zope.schema validation errors.


3.6 (2017-12-20)
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Expand Up @@ -111,6 +111,7 @@ def alltests():
'zc.sourcefactory',
'zope.container',
'zope.password',
'zope.schema >= 4.6.0',
'zope.testing',
],
adding=['zope.app.container >= 3.7'],
Expand Down Expand Up @@ -145,6 +146,7 @@ def alltests():
'zc.sourcefactory',
'zope.container',
'zope.password',
'zope.schema >= 4.6.0',
'zope.testing',
'zope.testrunner',
],
Expand Down
4 changes: 2 additions & 2 deletions src/z3c/form/browser/checkbox.txt
Expand Up @@ -218,8 +218,8 @@ the value (which is used as a backup label) contains non-ASCII characters:
'name': 'widget.name:list',
'value': 'no...'}]

Note: The "\234" character is interpreted differently in Pytohn 2 and 3
here. (This is mostly due to changes int he SimpleVocabulary code.)
Note: The "\234" character is interpreted differently in Python 2 and 3
here. (This is mostly due to changes in the SimpleVocabulary code.)


Single Checkbox Widget
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/objectmulti.txt
Expand Up @@ -196,7 +196,7 @@ just cry about it in the HTML:
<span class="required">*</span>
</label>
</div>
<div class="error">Wrong contained type</div>
<div class="error">An object failed schema or invariant validation.</div>
<div class="widget">
<div class="multi-widget-checkbox">
<input class="multi-widget-checkbox checkbox-widget"
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/converter.txt
Expand Up @@ -77,7 +77,7 @@ conversion error:
>>> conv.toFieldValue('3.4')
Traceback (most recent call last):
...
ValueError: invalid literal for int(): 3.4
InvalidIntLiteral: invalid literal for int(): 3.4

Also, the conversion to the field value also validates the data; in this case
negative values are not allowed:
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/term.txt
Expand Up @@ -117,7 +117,7 @@ Initially we get an error because the "Ratings" vocabulary is not defined:
... None, request, None, ratingField2, widget)
Traceback (most recent call last):
...
VocabularyRegistryError: unknown vocabulary: 'Ratings'
MissingVocabularyError: Can't validate value without vocabulary named 'Ratings'

Let's now register the vocabulary under this name:

Expand Down

0 comments on commit 4421dc4

Please sign in to comment.