-
-
Notifications
You must be signed in to change notification settings - Fork 427
add range validation #1887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
add range validation #1887
Conversation
CodSpeed Performance ReportMerging #1887 will not alter performanceComparing Summary
|
Pull Request Test Coverage Report for Build 13370608176Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please copy the description from the previous PR?
@@ -14,6 +14,7 @@ Changelog | |||
Added | |||
^^^^^ | |||
- Implement __contains, __contained_by, __overlap and __len for ArrayField (#1877) | |||
- Added default range validation to IntField, BigIntField, SmallIntField |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please mention this PR in CHANGELOG?
with self.assertRaises(ValidationError): | ||
await testmodels.IntFields.create(intnum=-2147483649) | ||
|
||
async def test_max(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_max_boundary_validation
is probably a better name
with self.assertRaises(ValidationError): | ||
await testmodels.SmallIntFields.create(smallintnum=-32769) | ||
|
||
async def test_max(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_max_boundary_validation
with self.assertRaises(ValidationError): | ||
await testmodels.BigIntFields.create(intnum=-9223372036854775809) | ||
|
||
async def test_max(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_max_boundary_validation
please, see #1868