FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
openapi-core/tests/unit/test_util.py at master · python-openapi/openapi-core · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
python-openapi
/
openapi-core
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
141
Star
369
Code
Issues
69
Pull requests
36
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
openapi-core
/
tests
/
unit
/
test_util.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (17 loc) · 611 Bytes
Breadcrumbs
openapi-core
/
tests
/
unit
/
test_util.py
Copy path
File metadata and controls
22 lines (17 loc) · 611 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
import
pytest
from
openapi_core
.
util
import
forcebool
class
TestForcebool
:
@
pytest
.
mark
.
parametrize
(
"val"
, [
"y"
,
"yes"
,
"t"
,
"true"
,
"on"
,
"1"
,
True
])
def
test_true
(
self
,
val
):
result
=
forcebool
(
val
)
assert
result
is
True
@
pytest
.
mark
.
parametrize
(
"val"
, [
"n"
,
"no"
,
"f"
,
"false"
,
"off"
,
"0"
,
False
]
)
def
test_false
(
self
,
val
):
result
=
forcebool
(
val
)
assert
result
is
False
@
pytest
.
mark
.
parametrize
(
"val"
, [
"random"
,
"idontknow"
,
""
])
def
test_value_error
(
self
,
val
):
with
pytest
.
raises
(
ValueError
):
forcebool
(
val
)
Back
|
FazBrowse Home
|
New Git URL