FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
validators/tests/test_validation_failure.py at master · python-validators/validators · GitHub
python-validators
validators
Repository navigation
Code
Issues
3
(3)
Pull requests
2
(2)
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
validators
/
tests
/
test_validation_failure.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (24 loc) · 931 Bytes
Breadcrumbs
validators
/
tests
/
test_validation_failure.py
Copy path
File metadata and controls
33 lines (24 loc) · 931 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""Test validation Failure."""
# local
from
validators
import
between
failed_obj_repr
=
"ValidationError(func=between"
class
TestValidationError
:
"""Test validation Failure."""
def
setup_method
(
self
):
"""Setup Method."""
self
.
is_in_between
=
between
(
3
,
min_val
=
4
,
max_val
=
5
)
def
test_boolean_coerce
(
self
):
"""Test Boolean."""
assert
not
bool
(
self
.
is_in_between
)
assert
not
self
.
is_in_between
def
test_repr
(
self
):
"""Test Repr."""
assert
failed_obj_repr
in
repr
(
self
.
is_in_between
)
def
test_string
(
self
):
"""Test Repr."""
assert
failed_obj_repr
in
str
(
self
.
is_in_between
)
def
test_arguments_as_properties
(
self
):
"""Test argument properties."""
assert
self
.
is_in_between
.
__dict__
[
"value"
]
==
3
assert
self
.
is_in_between
.
__dict__
[
"min_val"
]
==
4
assert
self
.
is_in_between
.
__dict__
[
"max_val"
]
==
5
Back
|
FazBrowse Home
|
New Git URL