Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Validata
Validata Core
Commits
7cdf72ad
Commit
7cdf72ad
authored
Oct 12, 2021
by
Pierre Dittgen
Browse files
Add tests
parent
a03623a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_core.py
View file @
7cdf72ad
...
@@ -84,6 +84,14 @@ a;b;c"""
...
@@ -84,6 +84,14 @@ a;b;c"""
assert
report
.
valid
assert
report
.
valid
def
test_empty_required_value
(
schema_abc
):
source
=
[[
"A"
,
"B"
,
"C"
],
[
""
,
"b"
,
"c"
]]
report
=
validate
(
source
,
schema_abc
)
assert
not
report
.
valid
assert
len
(
report
[
"tasks"
][
0
][
"errors"
])
==
1
assert
report
[
"tasks"
][
0
][
"errors"
][
0
][
"code"
]
==
"constraint-error"
def
test_missing_required_column
(
schema_abc
):
def
test_missing_required_column
(
schema_abc
):
source
=
[[
"B"
,
"C"
],
[
"b"
,
"c"
]]
source
=
[[
"B"
,
"C"
],
[
"b"
,
"c"
]]
report
=
validate
(
source
,
schema_abc
)
report
=
validate
(
source
,
schema_abc
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment